电速宝智配引擎
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

webpack.config.js 625B

12345678910111213141516171819202122232425262728
  1. const path = require('path');
  2. const webpack = require('webpack');
  3. const UnminifiedWebpackPlugin = require('unminified-webpack-plugin');
  4. module.exports = {
  5. entry: {
  6. 'dist': './lib/index.js',
  7. 'doc': './lib/index.js'
  8. },
  9. output: {
  10. path: path.resolve(__dirname, '.'),
  11. filename: '[name]/xml-js.min.js',
  12. libraryTarget: 'window',
  13. // library: 'xmljs' // don't specify this
  14. },
  15. // module: {
  16. // rules: [
  17. // {
  18. // test: /\.(js)$/,
  19. // use: 'babel-loader'
  20. // }
  21. // ]
  22. // },
  23. plugins: [
  24. new webpack.optimize.UglifyJsPlugin(),
  25. new UnminifiedWebpackPlugin()
  26. ]
  27. }