aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRahiel Kasim <rahielkasim@gmail.com>2018-12-01 12:01:30 +0100
committerRahiel Kasim <rahielkasim@gmail.com>2018-12-01 12:01:30 +0100
commitb50d7d0b1a5c99923fded8b2c53e486c363ac460 (patch)
tree07ced31cb316688729574edc7b9fc1c7e8ab4f6c
parentaef7d9afe7ac5612bd4f8f27a42694fa33e9649c (diff)
upgrade webpack and dependencies
-rwxr-xr-xbuild.bash1
-rw-r--r--package.json30
-rw-r--r--webpack.config.js14
3 files changed, 26 insertions, 19 deletions
diff --git a/build.bash b/build.bash
index 364bd30..1af320c 100755
--- a/build.bash
+++ b/build.bash
@@ -1,6 +1,5 @@
#!/usr/bin/env bash
set -euo pipefail
-IFS=$'\n\t'
dist="dist/"
BROWSER=$1
diff --git a/package.json b/package.json
index 8dc414e..5667f1f 100644
--- a/package.json
+++ b/package.json
@@ -5,9 +5,9 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"lint": "eslint . --ignore-path .gitignore && web-ext lint -s ./dist",
- "build": "webpack --optimize-minimize --display-optimization-bailout",
+ "build": "webpack --mode=production --optimize-minimize",
"firefox": "web-ext run -s ./dist -f /usr/bin/firefox --verbose",
- "start": "webpack --watch"
+ "start": "webpack --watch --mode=development"
},
"repository": {
"type": "git",
@@ -17,17 +17,27 @@
"url": "https://github.com/rahiel/archiveror/issues"
},
"devDependencies": {
- "babel-core": "^6.26.3",
- "babel-loader": "^7.1.4",
- "babel-preset-es2015": "^6.24.1",
- "eslint": "^4.19.1",
- "source-map-loader": "^0.2.3",
- "web-ext": "^2.6.0",
- "webpack": "^3.8.1"
+ "@babel/core": "^7.1.6",
+ "@babel/preset-env": "^7.1.6",
+ "babel-loader": "^8.0.4",
+ "eslint": "^5.9.0",
+ "source-map-loader": "^0.2.4",
+ "web-ext": "^2.9.2",
+ "webpack": "^4.26.1",
+ "webpack-cli": "^3.1.2"
},
+ "browserslist": [
+ "firefox >= 52",
+ "chrome >= 48"
+ ],
"babel": {
"presets": [
- "es2015"
+ [
+ "@babel/preset-env",
+ {
+ "modules": false
+ }
+ ]
]
}
}
diff --git a/webpack.config.js b/webpack.config.js
index ebebfe3..3f48a4c 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -1,6 +1,4 @@
/* global __dirname */
-const webpack = require("webpack");
-
module.exports = {
entry: {
"dist/archiveror": "./src/archiveror.js",
@@ -13,16 +11,16 @@ module.exports = {
},
devtool: "source-map",
module: {
- loaders: [
+ rules: [
{
- loader: "babel-loader",
test: /\.js$/,
- exclude: /node_modules/
+ exclude: /node_modules/,
+ loader: "babel-loader",
+ options: {
+ cacheDirectory: true,
+ }
},
{ test: /\.css$/, loader: "style!css" }
]
},
- plugins: [
- new webpack.optimize.ModuleConcatenationPlugin()
- ]
};