webpack.config.prod.js 507 B

123456789101112131415161718192021
  1. const path = require('path')
  2. const merge = require('webpack-merge')
  3. const base = require('./webpack.config')
  4. module.exports = merge(base, {
  5. mode: 'production',
  6. // Enable a full source map. Generates a comment linking to the source map
  7. devtool: 'source-map',
  8. output: {
  9. // Override output path to minjs dir
  10. path: path.join(__dirname, '/public/minjs'),
  11. // Override filename to include hash for immutable caching
  12. filename: '[name]-[chunkhash].js',
  13. publicPath: '/minjs/'
  14. }
  15. })