Skip to content

Commit

Permalink
Update config for webpack-dev-server 5.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
11k committed Mar 28, 2024
1 parent c94fdad commit bdda462
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,22 @@ 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,
onProxyReq: (proxyReq) => {
bakeCookies(proxyReq);
},
},
'/cdn': {
{
context: ['/cdn'],
target: 'https://cdn.destiny.gg',
pathRewrite: { '^/cdn': '' },
secure: false,
Expand All @@ -47,7 +51,8 @@ module.exports = {
Host: 'cdn.destiny.gg',
},
},
'/chat': {
{
context: ['/chat'],
target: 'wss://chat.destiny.gg/ws',
pathRewrite: { '^/chat': '' },
secure: false,
Expand All @@ -60,7 +65,7 @@ module.exports = {
bakeCookies(proxyReq);
},
},
},
],
},
entry: {
demo: './assets/demo.js',
Expand Down

0 comments on commit bdda462

Please sign in to comment.