Skip to content

Commit

Permalink
Update Webpack front-end packages
Browse files Browse the repository at this point in the history
Beyond bumping all of the package versions up, this also replaces
UglifyJS with Terser to minify the JS files in production.
  • Loading branch information
nickjj committed Aug 4, 2020
1 parent 79e908a commit 1497bef
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
36 changes: 18 additions & 18 deletions assets/package.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
{
"repository": {},
"dependencies": {
"jquery": "~3.4.1",
"@fortawesome/fontawesome-free": "~5.12.0",
"bootstrap": "~4.4.1",
"popper.js": "~1.16.0"
"jquery": "~3.5.1",
"@fortawesome/fontawesome-free": "~5.14.0",
"bootstrap": "~4.5.0",
"popper.js": "~1.16.1"
},
"devDependencies": {
"@babel/core": "~7.7.7",
"@babel/preset-env": "~7.7.7",
"@babel/register": "~7.7.7",
"autoprefixer": "~9.7.3",
"babel-loader": "~8.0.6",
"copy-webpack-plugin": "~5.1.1",
"css-loader": "~3.4.0",
"file-loader": "~5.0.2",
"@babel/core": "~7.11.0",
"@babel/preset-env": "~7.11.0",
"@babel/register": "~7.10.5",
"autoprefixer": "~9.8.6",
"babel-loader": "~8.1.0",
"copy-webpack-plugin": "~6.0.3",
"css-loader": "~4.2.0",
"file-loader": "~6.0.0",
"mini-css-extract-plugin": "~0.9.0",
"node-sass": "~4.13.0",
"node-sass": "~4.14.1",
"optimize-css-assets-webpack-plugin": "~5.0.3",
"postcss-loader": "~3.0.0",
"precss": "~4.0.0",
"sass-loader": "~8.0.0",
"uglifyjs-webpack-plugin": "~2.2.0",
"webpack": "~4.41.5",
"webpack-cli": "~3.3.10",
"webpack-merge": "~4.2.2"
"sass-loader": "~9.0.2",
"terser-webpack-plugin": "~3.1.0",
"webpack": "~4.44.1",
"webpack-cli": "~3.3.12",
"webpack-merge": "~5.1.1"
},
"scripts": {
"build": "/node_modules/webpack/bin/webpack.js --mode=production -p",
Expand Down
8 changes: 4 additions & 4 deletions assets/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
var merge = require('webpack-merge');
var { merge } = require('webpack-merge');
var webpack = require('webpack');
var CopyWebpackPlugin = require('copy-webpack-plugin');
var MiniCssExtractPlugin = require('mini-css-extract-plugin');
var OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
var UglifyJsPlugin = require('uglifyjs-webpack-plugin');
var TerserPlugin = require('terser-webpack-plugin');

var common = {
watchOptions: {
Expand Down Expand Up @@ -46,7 +46,7 @@ var common = {
},
optimization: {
minimizer: [
new UglifyJsPlugin({cache: true, parallel: true}),
new TerserPlugin({cache: true, parallel: true, sourceMap: false}),
new OptimizeCSSAssetsPlugin({})
]
}
Expand All @@ -69,7 +69,7 @@ module.exports = [
]
},
plugins: [
new CopyWebpackPlugin([{from: __dirname + '/static'}]),
new CopyWebpackPlugin({patterns: [{from: __dirname + '/static'}]}),
new MiniCssExtractPlugin({filename: 'css/app.css'}),
new webpack.ProvidePlugin({$: 'jquery', jQuery: 'jquery'}),
]
Expand Down

0 comments on commit 1497bef

Please sign in to comment.