Closed vladshcherbin closed 5 years ago
100%, is there any convention that everyone agree on. Like rollup uses the module
field from package.json
file to use the es6 module ( if exists ). Is it same for webpack?
@thetutlage yes, according to docs module
field is resolved before main
if exists.
Cool, lemme add it
Want to try it from Github and lemme know if all works fine.
I tried creating a simple example and build size dropped from 32KB -> 10KB
. But feel free to share if more optimizations can be done. ( I am not much active with build tools these days )
@thetutlage I believe the format should be set to es
instead of cjs
for es modules.
Yes, also no need to uglify and minify the bundle.
Closing, since the newer releases are not focused on browsers anymore
Currently,
umd
format is used. Since you are using rollup, it'll be great ifes
output format would be added for possible tree-shaking optimisations.