aboutsummaryrefslogtreecommitdiff
path: root/juick-server/webpack.config.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-11-08 21:38:27 +0300
committerGravatar Vitaly Takmazov2018-11-08 21:38:27 +0300
commit7aaa3f9a29c280f01c677c918932620be45cdbd7 (patch)
tree39947b2c889afd08f9c73ba54fab91159d2af258 /juick-server/webpack.config.js
parent3ea9770d0d43fbe45449ac4531ec4b0a374d98ea (diff)
Merge everything into single Spring Boot application
Diffstat (limited to 'juick-server/webpack.config.js')
-rw-r--r--juick-server/webpack.config.js74
1 files changed, 0 insertions, 74 deletions
diff --git a/juick-server/webpack.config.js b/juick-server/webpack.config.js
deleted file mode 100644
index 8057ec15..00000000
--- a/juick-server/webpack.config.js
+++ /dev/null
@@ -1,74 +0,0 @@
-const MiniCssExtractPlugin = require('mini-css-extract-plugin');
-const StyleLintPlugin = require('stylelint-webpack-plugin');
-const TerserPlugin = require('terser-webpack-plugin');
-const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
-
-module.exports = (env, argv) => {
- const dev = argv.mode !== 'production';
- const config = {
- devtool: dev ? 'source-map' : false,
- entry: {
- 'scripts': [
- 'core-js/modules/es6.promise',
- 'whatwg-fetch',
- __dirname + '/src/main/assets/scripts.js',
- require.resolve('evil-icons/assets/evil-icons.js')
- ],
- 'style': [
- __dirname + '/src/main/assets/style.css',
- require.resolve('evil-icons/assets/evil-icons.css')
- ]
- },
- output: {
- path: __dirname + '/src/main/resources/static',
- filename: '[name].js'
- },
- module: {
- rules: [
- { test: /\.jsx?$/, loader: 'eslint-loader', enforce: 'pre', exclude: /node_modules/, options: { failOnWarning: false, failOnError: true, fix: true } },
- { test: /\.js$/, loader: 'babel-loader' },
- {
- test: /\.css$/,
- use: [
- MiniCssExtractPlugin.loader,
- {
- loader: 'css-loader'
- },
- {
- loader: 'postcss-loader', options: {
- plugins: () => [
- require('autoprefixer')({})
- ]
- }
- }
- ]
- },
- { test: /\.png$/, loader: 'url-loader?limit=10000000000' },
- { test: /\.svg$/, loader: 'url-loader?limit=10000000000' }
- ]
- },
- plugins: [
- new StyleLintPlugin({ configFile: '.stylelintrc.json', context: 'src/main/assets', files: ['**/*.css'], emitErrors: false }),
- new MiniCssExtractPlugin({ filename: 'style.css', allChunks: true })
- ],
- };
- if (!dev) {
- config.optimization = {
- minimizer: [
- new TerserPlugin({
- cache: true,
- parallel: true,
- sourceMap: dev,
- terserOptions: {
- output: {
- comments: /@license/i
- }
- },
- extractComments: true
- }),
- new OptimizeCSSAssetsPlugin({})
- ]
- };
- }
- return config;
-};