Skip to content

Commit be1e5b2

Browse files
committed
chore: comment
1 parent c805d4e commit be1e5b2

File tree

1 file changed

+2
-0
lines changed
  • packages/plugin-rsc/src/plugins

1 file changed

+2
-0
lines changed

packages/plugin-rsc/src/plugins/cjs.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ export function cjsModuleRunnerPlugin(): Plugin[] {
5252
const result = transformCjsToEsm(code, ast)
5353
const output = result.output
5454
// 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
5557
output.append(`__vite_ssr_exportAll__(module.exports)`)
5658
return {
5759
code: output.toString(),

0 commit comments

Comments
 (0)