Skip to content

Commit 4afdd24

Browse files
committed
docs(cli): clarify playground import rewrite is regex-only
1 parent 569a0e6 commit 4afdd24

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

packages/cli/src/playground-html.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,8 @@ export const PLAYGROUND_HTML = `<!doctype html>
413413
return ESM_SH_BASE_URL + normalized;
414414
};
415415
416+
// Playground-only simplification: this regex-based rewrite can match
417+
// comment/string literals. Production runtime paths must use lexer parsing.
416418
const rewriteTranspiledImports = (code, planDetail) =>
417419
String(code ?? "")
418420
.replace(/\\bfrom\\s+["']([^"']+)["']/g, (full, specifier) =>

0 commit comments

Comments
 (0)