From da992ae333dabc7d8625b21d23a40b6e6b103d79 Mon Sep 17 00:00:00 2001 From: panr Date: Wed, 25 Jul 2018 16:31:54 +0200 Subject: [PATCH] Update Webpack config --- package.json | 6 +++--- webpack.config.js | 10 ---------- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 5f26f73..e83af93 100644 --- a/package.json +++ b/package.json @@ -3,10 +3,10 @@ "version": "1.0.0", "main": "index.js", "author": "panr & mobily", - "license": "private", + "license": "MIT", "scripts": { - "start": "hugo server --buildDrafts", - "dev": "node node_modules/.bin/webpack" + "dev": "webpack --mode=development --watch", + "build": "webpack --mode=production" }, "browserslist": [ "last 2 versions", diff --git a/webpack.config.js b/webpack.config.js index 7cdadfa..8b4e8f7 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -6,8 +6,6 @@ const UglifyJsPlugin = require("uglifyjs-webpack-plugin"); const path = require("path"); -const isProduction = process.env.NODE_ENV === "production"; - const join = (...paths) => path.join(__dirname, ...paths); module.exports = { @@ -15,7 +13,6 @@ module.exports = { extensions: [".js", ".css"], modules: ["source", "node_modules"], }, - watch: !isProduction, entry: { "main.js": [ join("source", "js", "index.js"), @@ -107,12 +104,5 @@ module.exports = { inject: false, }), new ExtractTextPlugin("[name]"), - new Webpack.LoaderOptionsPlugin({ - minimize: true, - debug: true, - }), - new Webpack.DefinePlugin({ - "process.env.NODE_ENV": JSON.stringify("development"), - }), ], };