Skip to content

Commit 54053f3

Browse files
committed
fix bundle script
1 parent 13eac42 commit 54053f3

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

packages/playground-bundling/scripts/generate_cmijs.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ const RESCRIPT_COMPILER_ROOT_DIR = path.join(
2727
"..",
2828
"..",
2929
);
30+
31+
const NODE_MODULES_DIR = path.join(RESCRIPT_COMPILER_ROOT_DIR, "node_modules");
32+
3033
const PLAYGROUND_DIR = path.join(RESCRIPT_COMPILER_ROOT_DIR, "playground");
3134

3235
// The playground-bundling root dir
@@ -63,9 +66,7 @@ const packages = resConfig["bs-dependencies"];
6366
// Otherwise we can't use them for compilation within the playground.
6467
function buildCompilerCmij() {
6568
const rescriptLibOcamlFolder = path.join(
66-
PROJECT_ROOT_DIR,
67-
"node_modules",
68-
"rescript",
69+
RESCRIPT_COMPILER_ROOT_DIR,
6970
"lib",
7071
"ocaml",
7172
);
@@ -86,15 +87,13 @@ function buildCompilerCmij() {
8687
function buildThirdPartyCmijs() {
8788
for (const pkg of packages) {
8889
const libOcamlFolder = path.join(
89-
PROJECT_ROOT_DIR,
90-
"node_modules",
90+
NODE_MODULES_DIR,
9191
pkg,
9292
"lib",
9393
"ocaml",
9494
);
9595
const libEs6Folder = path.join(
96-
PROJECT_ROOT_DIR,
97-
"node_modules",
96+
NODE_MODULES_DIR,
9897
pkg,
9998
"lib",
10099
"es6",

0 commit comments

Comments
 (0)