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

Commit

Permalink
build(webpack): server
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzodianni committed Jan 13, 2018
1 parent 40fa446 commit 34c0972
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Create mobile sidebar/sidenav experiance in angularjs",
"main": "index.js",
"scripts": {
"server": "live-server --open=demo",
"server": "live-server --quiet --open=demo --wait=1000",
"start": "npm run dev",
"dev": "webpack -w & npm run server",
"prod": "webpack"
Expand Down Expand Up @@ -42,6 +42,7 @@
"ng-annotate-loader": "^0.6.1",
"optimize-css-assets-webpack-plugin": "^3.2.0",
"style-loader": "^0.19.1",
"uglifyjs-webpack-plugin": "^1.1.6",
"webpack": "^3.10.0"
},
"dependencies": {
Expand Down
12 changes: 3 additions & 9 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const path = require('path');
const webpack = require('webpack');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
Expand Down Expand Up @@ -38,13 +38,7 @@ module.exports = {
plugins: [
new CleanWebpackPlugin(['dist'], {verbose: false}),
new ExtractTextPlugin('[name].css', {allChunks: true}),
new webpack.optimize.UglifyJsPlugin({
include: /\.min\.js$/,
minimize: true,
compress: {warnings: false},
}),
new OptimizeCssAssetsPlugin({
assetNameRegExp: /\.min\.css$/,
}),
new UglifyJsPlugin({include: /\.min\.js$/}),
new OptimizeCssAssetsPlugin({assetNameRegExp: /\.min\.css$/}),
],
};

0 comments on commit 34c0972

Please sign in to comment.