Skip to content

Commit

Permalink
update remix
Browse files Browse the repository at this point in the history
  • Loading branch information
Sander14121 committed Oct 25, 2024
1 parent 519439c commit 64c63d9
Show file tree
Hide file tree
Showing 4 changed files with 230 additions and 29 deletions.
243 changes: 218 additions & 25 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"@navikt/ds-tokens": "^6.1.0",
"@remix-run/css-bundle": "^2.3.1",
"@remix-run/express": "^2.8.1",
"@remix-run/node": "^2.3.1",
"@remix-run/react": "^2.3.1",
"@remix-run/node": "^2.13.1",
"@remix-run/react": "^2.13.1",
"@remix-run/serve": "^2.3.1",
"express": "^4.19.1",
"http-proxy-middleware": "^2.0.6",
Expand Down
6 changes: 6 additions & 0 deletions remix.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
// };
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
future: {
v2_meta: true,
v2_routeConvention: true,
v2_errorBoundary: true,
v2_headers: true,
},
ignoredRouteFiles: ["**/.*,", "**/*.css"],
serverModuleFormat: "cjs",
publicPath: "/rapportering/build/",
Expand Down
6 changes: 4 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ app.use('/rapportering/build', express.static('build', { immutable: true, maxAge

// Handle all other requests with Remix
app.all('*', createRequestHandler({
getLoadContext: () => ({}), // Your context here
build: require(path.join(__dirname, 'build')),
getLoadContext() {
return {};
},
mode: process.env.NODE_ENV,
}));

const port = process.env.PORT || 8000;
Expand Down

0 comments on commit 64c63d9

Please sign in to comment.