Closed
Description
Hi,
I was trying to reduce my webpack bundle size.
I found that you are also packing accounting-js in your "dist".
You can exclude this be tweaking your webpack config.
entry: './src/index.js',
externals: [
'vue',
'accounting-js',
],
Don't worry; your dist
file will still has a reference to accounting-js
and will be included by developer webpack.
Benefits
- This will reduce this package size to ~ 4kb
- Better debugging because
dist
does not include any 3rd party code - Take advantage of webpack tree shaking
- Prevent duplicate bundling when a developer has also installed
accounting-js
as dependency in his project
Cons
- When using this package without webpack (directly in browser); end user need to include
accounting-js
just before this script.
Findings
- babel-plugin-istanbul is adding lots of extra stuff in
dist
that is not required. - Removing this line saved lots of bytes
https://github.com/kevinongko/vue-numeric/blob/master/package.json#L71 - I was able to reduce your package dist size to 4kb (excluding accounting js)
Thanks.
Metadata
Metadata
Assignees
Labels
No labels