From bdda462f0803ccd558e9ea803f5d30e2e2afb33e Mon Sep 17 00:00:00 2001 From: Farhad Jay Date: Thu, 28 Mar 2024 12:36:47 -0700 Subject: [PATCH] Update config for webpack-dev-server 5.0.0 --- webpack.config.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 4d420b87..ec47d0ad 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -27,10 +27,13 @@ function bakeCookies(request) { module.exports = { devServer: { - https: true, + server: { + type: 'https', + }, port: 8282, - proxy: { - '/api': { + proxy: [ + { + context: ['/api'], target: 'https://www.destiny.gg', secure: false, changeOrigin: true, @@ -38,7 +41,8 @@ module.exports = { bakeCookies(proxyReq); }, }, - '/cdn': { + { + context: ['/cdn'], target: 'https://cdn.destiny.gg', pathRewrite: { '^/cdn': '' }, secure: false, @@ -47,7 +51,8 @@ module.exports = { Host: 'cdn.destiny.gg', }, }, - '/chat': { + { + context: ['/chat'], target: 'wss://chat.destiny.gg/ws', pathRewrite: { '^/chat': '' }, secure: false, @@ -60,7 +65,7 @@ module.exports = { bakeCookies(proxyReq); }, }, - }, + ], }, entry: { demo: './assets/demo.js',