//webpack-config.js
const path = require('path'); module.exports = { mode: 'none', entry: './src/index.js', output: { filename: 'bundle.js', path: path.resolve(__dirname, '../dist') }       };

在package.json 中scripts 增加
"build": "webpack --mode production ./src/index.js --output ./dist/bundle.js"
"dev": "webpack --mode development ./src/index.js --output ./dist/bundle.js"
 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-13
  • 2022-03-03
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-24
  • 2022-12-23
  • 2022-12-23
  • 2021-08-20
相关资源
相似解决方案