webpack.config.js 477 B

1234567891011121314151617181920
  1. const path = require("path")
  2. // node写法
  3. module.exports = {
  4. // development 开发
  5. // production 生成
  6. mode: 'production',
  7. // entry: "./demo.js"
  8. // entry: ['./src/a.js', './demo.js']
  9. // entry: {
  10. // hi: './src/a.js',
  11. // hello: './src/b.js'
  12. // }
  13. entry: './src/a.js',
  14. // output: {
  15. // filename: 'xxx.js',
  16. // clean: true,
  17. // path: path.resolve(__dirname, 'news')
  18. // }
  19. }
  20. // 打包命令:yarn webpack