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 411B

1234567891011121314151617181920
  1. const path = require('path');
  2. const TerserPlugin = require('terser-webpack-plugin');
  3. module.exports = {
  4. mode: 'production',
  5. entry: {
  6. index: './web_src/js/index.js',
  7. },
  8. devtool: 'source-map',
  9. output: {
  10. path: path.resolve(__dirname, 'public/js'),
  11. filename: "[name].js"
  12. },
  13. optimization: {
  14. minimize: true,
  15. minimizer: [new TerserPlugin({
  16. sourceMap: true
  17. })],
  18. },
  19. };