We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c805d4e commit be1e5b2Copy full SHA for be1e5b2
packages/plugin-rsc/src/plugins/cjs.ts
@@ -52,6 +52,8 @@ export function cjsModuleRunnerPlugin(): Plugin[] {
52
const result = transformCjsToEsm(code, ast)
53
const output = result.output
54
// TODO: can we use cjs-module-lexer to properly define named exports?
55
+ // for re-exports, we need to eagerly transform dependencies though.
56
+ // https://github.com/nodejs/node/blob/f3adc11e37b8bfaaa026ea85c1cf22e3a0e29ae9/lib/internal/modules/esm/translators.js#L382-L409
57
output.append(`__vite_ssr_exportAll__(module.exports)`)
58
return {
59
code: output.toString(),
0 commit comments