Webpack build failed with webpackConfig.resolve.mainFields = ['module', 'main'], for less bundle size via tree shaking.
But the value of field module is 'src/index.js' which would cause minifying code unsuccessfully, when using uglifyjs-webpack-plugin.
What expected is:
Compile 'src/index.js' to 'es/index.js' like 'lib/index.js', but without transforming import/export.
data-set version: 0.10.1
Webpack build failed with webpackConfig.resolve.mainFields = ['module', 'main'], for less bundle size via tree shaking. But the value of field
module
is 'src/index.js' which would cause minifying code unsuccessfully, when usinguglifyjs-webpack-plugin
.What expected is:
Compile 'src/index.js' to 'es/index.js' like 'lib/index.js', but without transforming import/export.
and package.json
or hot fix with