Skip to content

Commit

Permalink
avoid preprocess()ing modules with ids like `rollupPluginBabelHelpe…
Browse files Browse the repository at this point in the history
…rs.js`
  • Loading branch information
samualtnorman committed Jan 3, 2025
1 parent e4d0877 commit c61c24e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/processScript/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ export async function processScript(code: string, {
{
name: `hackmud-script-manager`,
async transform(code, id) {
if (!id.includes(`/node_modules/`))
if (id.startsWith(`/`) && !id.includes(`/node_modules/`))
return (await preprocess(code, { uniqueId })).code

let program!: NodePath<Program>
Expand Down

0 comments on commit c61c24e

Please sign in to comment.