Skip to content

Commit ff6939a

Browse files
committed
Upgrade webpack to v4.
1 parent f036811 commit ff6939a

File tree

3 files changed

+2075
-320
lines changed

3 files changed

+2075
-320
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"mocha": "5.0.5",
2727
"snap-shot": "2.17.0",
2828
"uglifyjs-webpack-plugin": "1.2.4",
29-
"webpack": "3.8.1"
29+
"webpack": "4.4.1",
30+
"webpack-cli": "2.0.13"
3031
}
3132
}

webpack.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
const UglifyJSPlugin = require("uglifyjs-webpack-plugin");
22
let filename;
33
let plugins = [];
4+
let mode;
45

56
if (process.env.NODE_ENV === "production") {
7+
mode = "production";
68
filename = "sparkline.min.js";
79
plugins.push(new UglifyJSPlugin({sourceMap: true}));
810
} else {
11+
mode = "development";
912
filename = "sparkline.js";
1013
}
1114

1215
module.exports = {
1316
entry: `${__dirname}/src/sparkline.js`,
1417
devtool: "source-map",
1518
target: "web",
19+
mode: mode,
1620
node: {
1721
fs: "empty"
1822
},

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy