webpack.config.js 413 B

123456789101112131415
  1. var PROD = process.argv.indexOf('-p') >= 0;
  2. module.exports = {
  3. entry: {
  4. 'echarts': __dirname + '/index.js',
  5. 'echarts.simple': __dirname + '/index.simple.js',
  6. 'echarts.common': __dirname + '/index.common.js'
  7. },
  8. output: {
  9. libraryTarget: 'umd',
  10. library: 'echarts',
  11. path: __dirname + '/dist',
  12. filename: PROD ? '[name].min.js' : '[name].js'
  13. }
  14. };