Skip to content

Commit 23011dc

Browse files
committed
Use root bsc flags
1 parent 92bd81c commit 23011dc

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

rescript.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
{
22
"name": "rescript",
3-
"bs-dependencies": ["@tests/gentype-react-example"]
3+
"bs-dependencies": [
4+
"@tests/gentype-react-example",
5+
"@tests/rescript-react",
6+
"@tests/analysis",
7+
"@tests/generic-jsx-transform",
8+
"@tests/reanalyze-deadcode",
9+
"@tests/incremental-typechecking",
10+
"@tests/reanalyze-termination"
11+
],
12+
"jsx": { "version": 4 }
413
}

rewatch/src/build/compile.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ pub fn compiler_args(
361361
is_type_dev: bool,
362362
is_local_dep: bool,
363363
) -> Vec<String> {
364+
let root_bsc_flags = config::flatten_flags(&root_config.compiler_flags);
364365
let bsc_flags = config::flatten_flags(&config.compiler_flags);
365366

366367
let dependency_paths = get_dependency_paths(config, project_root, workspace_root, packages, is_type_dev);
@@ -389,7 +390,7 @@ pub fn compiler_args(
389390
};
390391

391392
let jsx_args = root_config.get_jsx_args();
392-
let jsx_module_args = root_config.get_jsx_module_args();
393+
let jsx_module_args = config.get_jsx_module_args();
393394
let jsx_mode_args = root_config.get_jsx_mode_args();
394395
let jsx_preserve_args = root_config.get_jsx_preserve_args();
395396
let gentype_arg = config.get_gentype_arg();
@@ -454,6 +455,7 @@ pub fn compiler_args(
454455
jsx_module_args,
455456
jsx_mode_args,
456457
jsx_preserve_args,
458+
root_bsc_flags.to_owned(),
457459
bsc_flags.to_owned(),
458460
warning_args,
459461
gentype_arg,

0 commit comments

Comments
 (0)