Skip to content

Commit

Permalink
Fix scratchblocks path when part of larger npm tree
Browse files Browse the repository at this point in the history
  • Loading branch information
GarboMuffin committed Dec 19, 2024
1 parent 5ba0cd9 commit 68a592f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion development/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,9 @@ class Builder {

const scratchblocksPath = pathUtil.join(
__dirname,
"../node_modules/@turbowarp/scratchblocks/build/scratchblocks.min.js"
// Don't rely on node_modules being stored in a specific location or having a specific structure
// so that this works when we are a dependency in a bigger npm tree.
require.resolve('@turbowarp/scratchblocks')
);
build.files["/docs-internal/scratchblocks.js"] = new BuildFile(
scratchblocksPath
Expand Down

0 comments on commit 68a592f

Please sign in to comment.