File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
packages/plugin-rsc/src/plugins Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -16,9 +16,9 @@ export default "foo";
1616 expect ( await transformScanBuildStrip ( input ) ) . toMatchInlineSnapshot ( `
1717 "import "a";
1818 import "b";
19- import.meta.glob("d", {
19+ console.log( import.meta.glob("d", {
2020 query: "?e",
21- })
21+ }));
2222 "
2323 ` )
2424 } )
Original file line number Diff line number Diff line change @@ -29,7 +29,8 @@ export async function transformScanBuildStrip(code: string): Promise<string> {
2929 node . callee . property . type === 'Identifier' &&
3030 node . callee . property . name === 'glob'
3131 ) {
32- output += code . slice ( node . start , node . end ) + '\n'
32+ const importMetaGlob = code . slice ( node . start , node . end )
33+ output += `console.log(${ importMetaGlob } );\n`
3334 }
3435 } ,
3536 } )
You can’t perform that action at this time.
0 commit comments