From 000cd560393a64e0daf4355a7aaef3f0eee21676 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Thu, 13 Oct 2022 00:18:18 -0400 Subject: [PATCH] Only specify devServer options for first webpack config This avoids `[webpack-dev-middleware] ConcurrentCompilationError` issues when running `webpack serve`. However, it prevents running the dev server for just the `wall-display` config (as it no longer has the `/calendar` proxy route defined. --- webpack.config.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index ad12664..1d4e48f 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -2,14 +2,6 @@ const path = require('path'); const common = { mode: 'development', - devServer: { - proxy: { - '/calendar': { - target: 'https://calendar.google.com', - changeOrigin: true, - }, - }, - }, module: { rules: [ { @@ -38,6 +30,15 @@ module.exports = [ ...common, name: 'default', entry: './src/index.ts', + devServer: { + allowedHosts: 'all', + proxy: { + '/calendar': { + target: 'https://calendar.google.com', + changeOrigin: true, + }, + }, + }, module: { rules: [ {