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 2424 "contributors" : [
2525 " Daniel Swann (https://github.com/danswann)" ,
2626 " Longboyy" ,
27- " Helloman892"
27+ " Helloman892" ,
28+ " Sarah Klocke (https://sarahisweird.dev/)"
2829 ],
2930 "main" : " index.js" ,
3031 "repository" : {
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ import rollupPluginJSON from "@rollup/plugin-json"
2626import rollupPluginNodeResolve from "@rollup/plugin-node-resolve"
2727import type { LaxPartial } from "@samual/lib"
2828import { 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"
3030import prettier from "prettier"
3131import { rollup } from "rollup"
3232import { supportedExtensions as extensions } from "../constants"
@@ -260,7 +260,7 @@ export async function processScript(code: string, {
260260 {
261261 name : `hackmud-script-manager` ,
262262 async transform ( code , id ) {
263- if ( id . startsWith ( `/` ) && ! id . includes ( `/ node_modules/ ` ) )
263+ if ( isAbsolutePath ( id ) && ! id . includes ( `${ pathSeparator } node_modules${ pathSeparator } ` ) )
264264 return ( await preprocess ( code , { uniqueId } ) ) . code
265265
266266 let program ! : NodePath < Program >
You can’t perform that action at this time.
0 commit comments