Skip to content

Commit 5c88c5f

Browse files
committed
Reverting revert to default export, removing browser key from package.json as it's redirection away from main or module is what breaks webpack, fixes #162
1 parent 6630aad commit 5c88c5f

10 files changed

+18
-18
lines changed

.gitignore

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
node_modules/*
2-
.idea/*
3-
test/webpack/*
1+
node_modules/
2+
.idea/
3+
test/webpack/

dist/filesize.cjs

+4-3
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ function filesize (arg, {
195195
}
196196

197197
// Partial application for functional programming
198-
filesize.partial = function partial ({
198+
function partial ({
199199
bits = false,
200200
pad = false,
201201
base = -1,
@@ -231,6 +231,7 @@ filesize.partial = function partial ({
231231
roundingMethod,
232232
precision
233233
});
234-
};
234+
}
235235

236-
exports["default"] = filesize;
236+
exports.filesize = filesize;
237+
exports.partial = partial;

dist/filesize.esm.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ const STRINGS = {
189189
}
190190

191191
// Partial application for functional programming
192-
filesize.partial = function partial ({
192+
function partial ({
193193
bits = false,
194194
pad = false,
195195
base = -1,
@@ -225,4 +225,4 @@ filesize.partial = function partial ({
225225
roundingMethod,
226226
precision
227227
});
228-
};export{filesize as default};
228+
}export{filesize,partial};

dist/filesize.esm.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/filesize.esm.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/filesize.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @license BSD-3-Clause
66
* @version 10.0.3
77
*/
8-
(function(g,f){typeof exports==='object'&&typeof module!=='undefined'?module.exports=f():typeof define==='function'&&define.amd?define(f):(g=typeof globalThis!=='undefined'?globalThis:g||self,g.filesize=f());})(this,(function(){'use strict';const ARRAY = "array";
8+
(function(g,f){typeof exports==='object'&&typeof module!=='undefined'?f(exports):typeof define==='function'&&define.amd?define(['exports'],f):(g=typeof globalThis!=='undefined'?globalThis:g||self,f(g.filesize={}));})(this,(function(exports){'use strict';const ARRAY = "array";
99
const BIT = "bit";
1010
const BITS = "bits";
1111
const BYTE = "byte";
@@ -189,7 +189,7 @@ const STRINGS = {
189189
}
190190

191191
// Partial application for functional programming
192-
filesize.partial = function partial ({
192+
function partial ({
193193
bits = false,
194194
pad = false,
195195
base = -1,
@@ -225,4 +225,4 @@ filesize.partial = function partial ({
225225
roundingMethod,
226226
precision
227227
});
228-
};return filesize;}));
228+
}exports.filesize=filesize;exports.partial=partial;Object.defineProperty(exports,'__esModule',{value:true});}));

dist/filesize.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)