* Webpack config changes

* Updated documentation with example
* removed unwanted dependencies from starter pack
This commit is contained in:
Indrajith K L
2017-12-19 19:10:01 +05:30
parent 90d191ce4b
commit 9b608b89b1
13 changed files with 56 additions and 27 deletions

View File

@@ -1,10 +1,12 @@
const webpack = require("webpack");
const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const DashboardPlugin = require("webpack-dashboard/plugin");
const WebpackShellPlugin = require('webpack-shell-plugin');
const nodeEnv = process.env.NODE_ENV || "development";
const isProd = nodeEnv === "production";
console.log(webpack.plugins);
var config = {
devtool: isProd ? "hidden-source-map" : "source-map",
context: path.resolve("./src"),
@@ -45,7 +47,6 @@ var config = {
output: { comments: false },
sourceMap: true
}),
new DashboardPlugin(),
new webpack.LoaderOptionsPlugin({
options: {
tslint: {
@@ -53,6 +54,9 @@ var config = {
failOnHint: true
}
}
}),
new WebpackShellPlugin({
onBuildEnd: 'cp -r dist/* docs/example/'
})
],
devServer: {