Skip to content

Commit

Permalink
Bump webpack dev server (#1421)
Browse files Browse the repository at this point in the history
* Bump webpack-dev-server til ^5.1.0, legger den i devDependencies

* Oppdaterer config til v5, fikser ny config for det som før var en workaround for historyApiFallback
  • Loading branch information
hanneolsen authored Dec 4, 2024
1 parent 36cda9e commit 90ec748
Show file tree
Hide file tree
Showing 3 changed files with 230 additions and 103 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@
"react-router-dom": "^6.23.0",
"unleash-client": "^5.5.1",
"uuid": "^9.0.1",
"webpack-dev-server": "^4.15.1",
"xss": "^1.0.14"
},
"devDependencies": {
Expand Down Expand Up @@ -206,6 +205,7 @@
"webpack": "^5.94.0",
"webpack-bundle-analyzer": "^4.10.1",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.1.0",
"webpack-merge": "^5.10.0"
}
}
25 changes: 14 additions & 11 deletions src/webpack/webpack.development.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,21 @@ const devConfig: webpack.Configuration = mergeWithRules({
overlay: true,
},
open: [basePath],
proxy: {
[`${basePath}modellversjon`]: `http://localhost:55554`,
[`${basePath}api`]: `http://localhost:55554`,
[`${basePath}dokument`]: `http://localhost:55554`,
[`${basePath}toggles`]: `http://localhost:55554`,
[`${basePath}konverter`]: `http://localhost:55554`,
// Essentially en workaround for https://github.com/nrwl/nx/issues/3859
'*': {
target: 'http://localhost:3000',
pathRewrite: () => basePath,
},
historyApiFallback: {
index: basePath,
},
proxy: [
{
context: [
`${basePath}modellversjon`,
`${basePath}api`,
`${basePath}dokument`,
`${basePath}toggles`,
`${basePath}konverter`,
],
target: 'http://localhost:55554',
},
],
static: {
publicPath: basePath,
},
Expand Down
Loading

0 comments on commit 90ec748

Please sign in to comment.