Skip to content

Commit

Permalink
fix: supprt jsx runtime in SSR (#10467)
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Krick <matt.krick@gmail.com>
  • Loading branch information
mattkrick authored Nov 12, 2024
1 parent 1fe8e94 commit 849cfe7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion scripts/webpack/dev.servers.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ module.exports = {
alias: {
'~': path.join(CLIENT_ROOT),
'parabol-server': SERVER_ROOT,
'parabol-client': CLIENT_ROOT
'parabol-client': CLIENT_ROOT,
// this is for radix-ui, we import & transform ESM packages, but they can't find react/jsx-runtime
'react/jsx-runtime': require.resolve('react/jsx-runtime')
},
extensions: ['.mjs', '.js', '.json', '.ts', '.tsx', '.graphql'],
unsafeCache: true,
Expand Down
4 changes: 3 additions & 1 deletion scripts/webpack/prod.servers.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ module.exports = (config) => {
alias: {
'~': CLIENT_ROOT,
'parabol-client': CLIENT_ROOT,
'parabol-server': SERVER_ROOT
'parabol-server': SERVER_ROOT,
// this is for radix-ui, we import & transform ESM packages, but they can't find react/jsx-runtime
'react/jsx-runtime': require.resolve('react/jsx-runtime')
},
extensions: ['.mjs', '.js', '.json', '.ts', '.tsx', '.graphql'],
// this is run outside the server dir, but we want to favor using modules from the server dir
Expand Down

0 comments on commit 849cfe7

Please sign in to comment.