Skip to content
Snippets Groups Projects
Select Git revision
  • b2e9dace1916a3f61b755fe53a5eabab851da798
  • master default
  • 5.0.0 protected
  • 4.0.0
  • dev
  • 5.0.0-superduperalpha-2
  • 5.0.0-superduperalpha-1
  • v3.0.0-prealpha
8 results

webpack.config.prod.js

Blame
  • webpack.config.prod.js 814 B
    const { merge } = require('webpack-merge');
    const common = require('./webpack.common.js');
    const HtmlWebpackPlugin = require('html-webpack-plugin');
    const CopyPlugin = require('copy-webpack-plugin');
    
    module.exports = merge(common, {
      mode: 'production',
      plugins: [
        new HtmlWebpackPlugin({
          template: './index.html',
        }),
        new CopyPlugin({
          patterns: [
            { from: 'img', to: 'img' },
            { from: 'css', to: 'css' },
            { from: 'js/vendor', to: 'js/vendor' },
            { from: 'assets', to: 'assets' },
            { from: 'icon.svg', to: 'icon.svg' },
            { from: 'favicon.ico', to: 'favicon.ico' },
            { from: 'robots.txt', to: 'robots.txt' },
            { from: '404.html', to: '404.html' },
            { from: 'manifest.json', to: 'manifest.json' },
          ],
        }),
      ],
    });