Skip to content

Commit

Permalink
Explicitly set serverModuleFormat to cjs
Browse files Browse the repository at this point in the history
This silences the following warning:

```
 warn  The default server module format is changing in v2
┃ The default format will change from `cjs` to `esm`.
┃ You can keep using `cjs` by explicitly specifying `serverModuleFormat: 'cjs'`.
┃ You can opt-in early to this change by explicitly specifying `serverModuleFormat: 'esm'`
┃ -> https://remix.run/docs/en/v1.16.0/pages/v2#servermoduleformat
┗
```
  • Loading branch information
lpsinger committed Aug 29, 2023
1 parent 3735691 commit 85fc0f0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions remix.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export default {
server: './server.ts',
serverBuildPath: 'build/server/index.js',
serverMinify: isProduction,
serverModuleFormat: 'cjs',
serverDependenciesToBundle: [
...esmOnlyModules,
...(isProduction ? [/^(?!@?aws-sdk(\/|$))/] : []),
Expand Down

0 comments on commit 85fc0f0

Please sign in to comment.