antvis / data-set

state driven all in one data process for data visualization.
MIT License
248 stars 46 forks source link

[Feature request] compile src to folder es, for referencing with package.json field 'module' #47

Closed aixfox closed 4 years ago

aixfox commented 5 years ago

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 using uglifyjs-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

{
  "module": "es/index.js",
}

or hot fix with

{
  "module": "lib/index.js",
}
aixfox commented 4 years ago

fixed with "module": "lib/index.js",