summaryrefslogtreecommitdiff
path: root/webpack.production.js
diff options
context:
space:
mode:
authorChristoph (Sheogorath) Kern2018-10-10 23:38:13 +0200
committerGitHub2018-10-10 23:38:13 +0200
commitbf525e43d4b1806b0a99f7c145a16087de7438fa (patch)
treebcb2a81120b3754e819db654ef7a5d7c7051d884 /webpack.production.js
parentc7478c1694be2b3b880b8d52f9c15d60832a06f8 (diff)
parent7eed584c0197d0b5a93f58f8b645c0b84588d8e1 (diff)
Merge pull request #1007 from davidmehren/webpack-4
Webpack 4 refactor & docs
Diffstat (limited to 'webpack.production.js')
-rw-r--r--webpack.production.js75
1 files changed, 0 insertions, 75 deletions
diff --git a/webpack.production.js b/webpack.production.js
deleted file mode 100644
index 67387583..00000000
--- a/webpack.production.js
+++ /dev/null
@@ -1,75 +0,0 @@
-var baseConfig = require('./webpackBaseConfig')
-var webpack = require('webpack')
-var path = require('path')
-const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin')
-const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
-const MiniCssExtractPlugin = require('mini-css-extract-plugin')
-
-module.exports = [Object.assign({}, baseConfig, {
- plugins: baseConfig.plugins.concat([
- new webpack.DefinePlugin({
- 'process.env': {
- 'NODE_ENV': JSON.stringify('production')
- }
- })
- ]),
-
- optimization: {
- minimizer: [
- new UglifyJsPlugin({
- parallel: true,
- cache: true
- })
- ],
- splitChunks: {
- chunks: 'async',
- minChunks: Infinity
- }
- },
-
- output: {
- path: path.join(__dirname, 'public/build'),
- publicPath: '/build/',
- filename: '[id].[name].[hash].js'
- // baseUrl: '<%- url %>'
- }
-}), {
- // This Chunk is used in the 'save as html' feature.
- // It is embedded in the html file and contains CSS for styling.
-
- entry: {
- htmlExport: path.join(__dirname, 'public/js/htmlExport.js')
- },
-
- output: {
- path: path.join(__dirname, 'public/build'),
- publicPath: '/build/',
- filename: '[name].js'
- },
- plugins: [
- new webpack.DefinePlugin({
- 'process.env': {
- 'NODE_ENV': JSON.stringify('production')
- }
- }),
- new MiniCssExtractPlugin({
- filename: 'html.min.css'
- })
- ],
-
- optimization: {
- minimizer: [
- new OptimizeCSSAssetsPlugin({})
- ]
- },
-
- module: {
- rules: [{
- test: /\.css$/,
- use: [
- MiniCssExtractPlugin.loader,
- 'css-loader'
- ]
- }]
- }
-}]