Skip to content

Commit 59c3797

Browse files
committed
update major dependencies
1 parent e6a0e67 commit 59c3797

File tree

3 files changed

+2331
-1924
lines changed

3 files changed

+2331
-1924
lines changed

package.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"name": "angularjs-es6-starter-kit",
3-
"version": "2.0.0",
3+
"version": "2.1.0",
44
"description": "AngularJS aka Angular 1, ES6, Webpack Starter Kit Project which includes Bootstrap 4 also.",
55
"main": "index.js",
66
"scripts": {
7-
"start": "webpack-dev-server --progress --open",
8-
"build": "NODE_ENV=production webpack -p",
7+
"start": "webpack serve --progress --open",
8+
"build": "NODE_ENV=production webpack",
99
"test": "echo \"Error: no test specified\" && exit 1",
1010
"serve-build": "yarn build && node ./index.js"
1111
},
@@ -21,27 +21,27 @@
2121
"babel-plugin-transform-class-properties": "6.24.1",
2222
"babel-plugin-transform-es2015-arrow-functions": "6.22.0",
2323
"babel-preset-es2015": "6.24.1",
24-
"clean-webpack-plugin": "0.1.16",
24+
"clean-webpack-plugin": "3.0.0",
2525
"css-loader": "0.28.4",
2626
"express": "^4.16.4",
27-
"file-loader": "3.0.1",
28-
"html-loader": "0.5.0",
29-
"html-webpack-plugin": "3.2.0",
30-
"mini-css-extract-plugin": "^0.5.0",
27+
"file-loader": "6.2.0",
28+
"html-loader": "2.1.2",
29+
"html-webpack-plugin": "5.3.1",
30+
"mini-css-extract-plugin": "1.6.0",
3131
"ng-annotate-loader": "0.6.1",
3232
"node-sass": "4.5.3",
33-
"optimize-css-assets-webpack-plugin": "3.0.0",
33+
"optimize-css-assets-webpack-plugin": "6.0.0",
3434
"sass-loader": "6.0.6",
3535
"style-loader": "^0.23.1",
36-
"uglifyjs-webpack-plugin": "^2.1.2",
37-
"url-loader": "0.5.9",
38-
"webpack": "4.29.6",
39-
"webpack-cli": "^3.3.0",
40-
"webpack-dev-server": "3.2.1"
36+
"terser-webpack-plugin": "5.1.3",
37+
"url-loader": "4.1.1",
38+
"webpack": "5.38.1",
39+
"webpack-cli": "4.7.0",
40+
"webpack-dev-server": "3.11.2"
4141
},
4242
"dependencies": {
43-
"angular": "1.7.8",
44-
"angular-ui-router": "1.0.22",
43+
"angular": "1.8.2",
44+
"angular-ui-router": "1.0.29",
4545
"bootstrap": "4.3.1",
4646
"font-awesome": "4.7.0",
4747
"jquery": "3.3.1",

webpack.config.js

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
const webpack = require('webpack');
22
const path = require('path');
3-
const CleanWebpackPlugin = require('clean-webpack-plugin');
3+
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
44
const HtmlWebpackPlugin = require('html-webpack-plugin');
55
const OptimizeCssAssetsWebpackPlugin = require('optimize-css-assets-webpack-plugin');
66
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
7-
const UglifyJsPlugin = require("uglifyjs-webpack-plugin");
7+
const TerserPlugin = require("terser-webpack-plugin");
88
const devMode = process.env.NODE_ENV !== 'production'
99

1010
const config = {
@@ -22,10 +22,11 @@ const config = {
2222
rules: [
2323
{
2424
test: /\.js$/,
25-
exclude: /node_modules/,
26-
loader: ['ng-annotate-loader', 'babel-loader']
25+
include: [path.resolve(__dirname, 'src')],
26+
use: [ { loader: 'ng-annotate-loader'}, { loader: 'babel-loader'}]
2727
},
2828
{
29+
2930
test: /\.(scss)$/,
3031
use: [
3132
devMode ? { loader: "style-loader" } : MiniCssExtractPlugin.loader,
@@ -35,48 +36,57 @@ const config = {
3536
},
3637
// for fixing of loading bootstrap icon files
3738
{
38-
test: /\.(png|jpg|jpeg|gif|svg|woff|woff2)$/,
39-
loader: 'url-loader?limit=10000',
40-
options: {
41-
name: './fonts/[name].[ext]'
42-
}
39+
test: /\.(png|jpg|jpeg|gif|svg|woff|woff2|eot|ttf)$/i,
40+
use: [{
41+
loader: 'url-loader',
42+
options: {
43+
limit: 10000,
44+
outputPath: 'fonts/',
45+
publicPath: '../fonts/',
46+
esModule: false,
47+
}
48+
}],
4349
},
4450
{
4551
test: /\.(eot|ttf)$/,
46-
loader: 'file-loader',
47-
options: {
48-
name: './fonts/[name].[ext]'
49-
}
52+
use: [{
53+
loader: 'file-loader',
54+
options: {
55+
outputPath: 'fonts/',
56+
publicPath: '../fonts/',
57+
esModule: false,
58+
}
59+
}],
5060
},
5161
{ test: /\.html$/, loader: 'html-loader' }
5262
]
5363
},
5464
optimization: {
65+
minimize: true,
5566
minimizer: [
56-
new UglifyJsPlugin({
57-
cache: true,
58-
}),
67+
new TerserPlugin(),
5968
new OptimizeCssAssetsWebpackPlugin({})
6069
]
6170
},
6271
plugins: [
63-
new CleanWebpackPlugin('build'),
72+
new CleanWebpackPlugin(),
6473
new HtmlWebpackPlugin({ template: './src/index.html' }),
6574
new webpack.ProvidePlugin({
6675
jQuery: 'jquery',
6776
$: 'jquery',
6877
jquery: 'jquery'
6978
}),
7079
new MiniCssExtractPlugin({
71-
filename: "styles/[name].[hash].css",
72-
chunkFilename: "styles/[id].[hash].css"
80+
filename: "[name].[fullhash].css",
81+
chunkFilename: "[id].[fullhash].css"
7382
})
7483
],
7584
devServer: {
7685
port: 3000,
7786
contentBase: './src/',
7887
historyApiFallback: true
79-
}
88+
},
89+
devtool: 'source-map',
8090
};
8191

8292
module.exports = config;

0 commit comments

Comments
 (0)