aboutsummaryrefslogtreecommitdiff
path: root/webpack.config.js
diff options
context:
space:
mode:
Diffstat (limited to 'webpack.config.js')
-rw-r--r--webpack.config.js62
1 files changed, 5 insertions, 57 deletions
diff --git a/webpack.config.js b/webpack.config.js
index c2d0dd4e..08cad4cf 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -1,5 +1,3 @@
-const MiniCssExtractPlugin = require('mini-css-extract-plugin');
-const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
const ESLintPlugin = require('eslint-webpack-plugin');
const CopyPlugin = require('copy-webpack-plugin');
@@ -9,22 +7,7 @@ module.exports = (env, argv) => {
devtool: dev ? 'source-map' : false,
entry: {
'scripts': [
- 'core-js/modules/es.array.index-of',
- 'core-js/modules/es.array.iterator',
- 'core-js/modules/es.array.map',
- 'core-js/modules/es.function.name',
- 'core-js/modules/es.object.create',
- 'core-js/modules/es.object.define-property',
- 'core-js/modules/es.object.keys',
- 'core-js/modules/es.object.set-prototype-of',
- 'core-js/modules/es.promise',
- 'core-js/modules/es.string.split',
- 'core-js/modules/es.symbol',
- 'core-js/modules/es.weak-map',
- 'core-js/modules/web.dom-collections.iterator',
- __dirname + '/src/main/assets/scripts.js',
- __dirname + '/src/main/assets/style.css',
- 'evil-icons/assets/evil-icons.css'
+ __dirname + '/src/main/assets/scripts.js'
]
},
output: {
@@ -33,38 +16,10 @@ module.exports = (env, argv) => {
},
module: {
rules: [
- { test: /\.js$/, loader: 'babel-loader' },
- {
- test: /\.css$/,
- use: [
- dev ? 'style-loader' : MiniCssExtractPlugin.loader,
- {
- loader: 'css-loader',
- options: {
- sourceMap: dev
- }
- },
- {
- loader: 'postcss-loader',
- options: {
- postcssOptions: {
- plugins: [
- 'stylelint',
- ['postcss-preset-env', { stage: 0 }]
- ]
- }
- }
- }
- ]
- },
- {
- test: /\.(jpe?g|png|svg|gif)$/i,
- loader: 'url-loader'
- }
+ { test: /\.js$/, loader: 'babel-loader' }
]
},
plugins: [
- new MiniCssExtractPlugin({ filename: 'style.css' }),
new ESLintPlugin({ files: 'src/main/assets', lintDirtyModulesOnly: true, failOnWarning: false, failOnError: true, fix: false }),
new CopyPlugin({
patterns: [{
@@ -74,15 +29,8 @@ module.exports = (env, argv) => {
}),
],
};
- if (!dev) {
- config.optimization = {
- minimizer: [
- '...',
- new CssMinimizerPlugin({
- sourceMap: true
- })
- ]
- };
- }
+ config.optimization = {
+ minimize: !dev
+ };
return config;
};