Skip to content

Commit 0cf67ac

Browse files
authored
fix(plugin-rsc): avoid stripping rolldown runtime during scan build (#1096)
1 parent ac101ea commit 0cf67ac

File tree

1 file changed

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

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { exactRegex } from '@rolldown/pluginutils'
12
import * as esModuleLexer from 'es-module-lexer'
23
import { walk } from 'estree-walker'
34
import { parseAstAsync, type Plugin } from 'vite'
@@ -15,6 +16,9 @@ export function scanBuildStripPlugin({
1516
apply: 'build',
1617
enforce: 'post',
1718
transform: {
19+
filter: {
20+
id: { exclude: exactRegex('\0rolldown/runtime.js') },
21+
},
1822
async handler(code, _id, _options) {
1923
if (!manager.isScanBuild) return
2024
const output = await transformScanBuildStrip(code)

0 commit comments

Comments
 (0)