antvis / data-set

state driven all in one data process for data visualization.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

aixfox opened this issue · comments

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",
}

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