Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit 34c0972

Browse files
committed
build(webpack): server
1 parent 40fa446 commit 34c0972

2 files changed

Lines changed: 5 additions & 10 deletions

File tree

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "Create mobile sidebar/sidenav experiance in angularjs",
55
"main": "index.js",
66
"scripts": {
7-
"server": "live-server --open=demo",
7+
"server": "live-server --quiet --open=demo --wait=1000",
88
"start": "npm run dev",
99
"dev": "webpack -w & npm run server",
1010
"prod": "webpack"
@@ -42,6 +42,7 @@
4242
"ng-annotate-loader": "^0.6.1",
4343
"optimize-css-assets-webpack-plugin": "^3.2.0",
4444
"style-loader": "^0.19.1",
45+
"uglifyjs-webpack-plugin": "^1.1.6",
4546
"webpack": "^3.10.0"
4647
},
4748
"dependencies": {

webpack.config.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const path = require('path');
2-
const webpack = require('webpack');
2+
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
33
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');
44
const CleanWebpackPlugin = require('clean-webpack-plugin');
55
const ExtractTextPlugin = require('extract-text-webpack-plugin');
@@ -38,13 +38,7 @@ module.exports = {
3838
plugins: [
3939
new CleanWebpackPlugin(['dist'], {verbose: false}),
4040
new ExtractTextPlugin('[name].css', {allChunks: true}),
41-
new webpack.optimize.UglifyJsPlugin({
42-
include: /\.min\.js$/,
43-
minimize: true,
44-
compress: {warnings: false},
45-
}),
46-
new OptimizeCssAssetsPlugin({
47-
assetNameRegExp: /\.min\.css$/,
48-
}),
41+
new UglifyJsPlugin({include: /\.min\.js$/}),
42+
new OptimizeCssAssetsPlugin({assetNameRegExp: /\.min\.css$/}),
4943
],
5044
};

0 commit comments

Comments
 (0)