webpack.config.js 313 B

123456789101112131415
  1. const path = require('path')
  2. const TerserPlugin = require('terser-webpack-plugin')
  3. module.exports = {
  4. entry: './js/main.js',
  5. mode: 'production',
  6. optimization: {
  7. minimize: true,
  8. minimizer: [new TerserPlugin()],
  9. },
  10. output: {
  11. filename: 'min.js',
  12. path: path.resolve(__dirname, '.'),
  13. },
  14. }