webpack.config.js 484 B

1234567891011121314151617181920212223242526
  1. const path = require('path')
  2. module.exports = {
  3. mode: 'production',
  4. // entry: [
  5. // './src/a1.js',
  6. // './src/a2.js'
  7. // ],
  8. // entry: {
  9. // hello1: './src/a1.js',
  10. // hello2: './src/a2.js'
  11. // },
  12. output: {
  13. // filename: '[name]-[id]-[hash].js',
  14. filename: 'file5.js',
  15. clean: true,
  16. // path: path.resolve(__dirname, 'hello')
  17. },
  18. module: {
  19. rules: [
  20. {
  21. test: /\.css$/,
  22. use: ['style-loader', 'css-loader']
  23. }
  24. ]
  25. }
  26. }