webpack speed improvements

This commit is contained in:
Tony Air 2020-02-25 13:22:43 +07:00
parent 66ce588182
commit 59407fc0c4
2 changed files with 10 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@a2nt/ss-bootstrap-ui-webpack-boilerplate",
"version": "1.8.1",
"version": "1.8.2",
"author": "Tony Air <tony@twma.pro>",
"license": "MIT",
"description": "This UI Kit allows you to build Bootstrap 4 webapp with some extra UI features. It's easy to extend and easy to convert HTML templates to CMS templates.",
@ -85,6 +85,7 @@
"extract-text-webpack-plugin": "^4.0.0-beta.0",
"favicons-webpack-plugin": "^1.0.2",
"file-loader": "^1.1.5",
"hard-source-webpack-plugin": "^0.13.1",
"html-loader": "^0.5.5",
"html-webpack-plugin": "^4.0.0-beta.11",
"imagemin-gifsicle": "^7.0.0",
@ -92,6 +93,7 @@
"imagemin-optipng": "^7.1.0",
"imagemin-svgo": "^7.0.0",
"imagemin-webpack": "^5.1.1",
"loglevel": "^1.6.7",
"lost": "^8.3.1",
"material-design-color": "^2.3.2",
"node-sass": "^4.13.1",

View File

@ -7,6 +7,8 @@ const path = require('path');
const filesystem = require('fs');
const autoprefixer = require('autoprefixer');
const HardSourceWebpackPlugin = require('hard-source-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const TerserPlugin = require('terser-webpack-plugin');
@ -20,6 +22,7 @@ const plugins = [
NODE_ENV: JSON.stringify('production'),
},
}),
new HardSourceWebpackPlugin(),
new webpack.LoaderOptionsPlugin({
minimize: COMPRESS,
debug: false,
@ -240,10 +243,12 @@ module.exports = {
['@babel/transform-react-jsx'],
['react-hot-loader/babel'],
],
cacheDirectory: true,
cacheCompression: false,
},
},
},
{
/*{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
@ -251,7 +256,7 @@ module.exports = {
{
test: /\.coffee?$/,
use: 'coffee-loader',
},
},*/
{
test: /\.worker\.js$/,
use: {