File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 24
24
"contributors" : [
25
25
" Daniel Swann (https://github.com/danswann)" ,
26
26
" Longboyy" ,
27
- " Helloman892"
27
+ " Helloman892" ,
28
+ " Sarah Klocke (https://sarahisweird.dev/)"
28
29
],
29
30
"main" : " index.js" ,
30
31
"repository" : {
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ import rollupPluginJSON from "@rollup/plugin-json"
26
26
import rollupPluginNodeResolve from "@rollup/plugin-node-resolve"
27
27
import type { LaxPartial } from "@samual/lib"
28
28
import { assert } from "@samual/lib/assert"
29
- import { relative as getRelativePath } from "path"
29
+ import { relative as getRelativePath , sep as pathSeparator , isAbsolute as isAbsolutePath } from "path"
30
30
import prettier from "prettier"
31
31
import { rollup } from "rollup"
32
32
import { supportedExtensions as extensions } from "../constants"
@@ -260,7 +260,7 @@ export async function processScript(code: string, {
260
260
{
261
261
name : `hackmud-script-manager` ,
262
262
async transform ( code , id ) {
263
- if ( id . startsWith ( `/` ) && ! id . includes ( `/ node_modules/ ` ) )
263
+ if ( isAbsolutePath ( id ) && ! id . includes ( `${ pathSeparator } node_modules${ pathSeparator } ` ) )
264
264
return ( await preprocess ( code , { uniqueId } ) ) . code
265
265
266
266
let program ! : NodePath < Program >
You can’t perform that action at this time.
0 commit comments