From 14e9cceac4eb63a69f6b0286f3aaf162125b58fe Mon Sep 17 00:00:00 2001 From: Niklas Date: Wed, 22 Apr 2020 15:13:33 +0200 Subject: [PATCH] changed webpack devserver config --- package.json | 2 +- webpack.config.js | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index d9b1a6e..c4068d0 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "", "main": "src/index.ts", "scripts": { - "devServer": "webpack-dev-server --mode development --inline --hot --open", + "devServer": "webpack-dev-server --mode development --open", "build": "webpack --mode development", "buildProd": "webpack --mode production" }, diff --git a/webpack.config.js b/webpack.config.js index 410cf9f..170f241 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,6 +1,8 @@ +/* eslint-env node */ +/* eslint-disable @typescript-eslint/no-var-requires */ + const HtmlWebpackPlugin = require("html-webpack-plugin"); const MiniCssExtractPlugin = require("mini-css-extract-plugin"); -const webpack = require("webpack"); const path = require("path"); module.exports = { @@ -15,11 +17,13 @@ module.exports = { }, devtool: "source-map", devServer: { - contentBase: "./dist", // Content base - inline: true, // Enable watch and live reload + contentBase: "./dist", + inline: true, host: "localhost", port: 8080, - stats: "errors-only" + stats: "errors-only", + liveReload: true, + watchContentBase: true }, module: { rules: [