mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 09:31:22 -05:00
fix: incremental build for deno declaration files (#9138)
This commit is contained in:
parent
b26dcbc69d
commit
f4dbb267c6
1 changed files with 9 additions and 1 deletions
10
cli/build.rs
10
cli/build.rs
|
@ -117,6 +117,15 @@ fn create_compiler_snapshot(
|
|||
"esnext.weakref",
|
||||
];
|
||||
|
||||
let path_dts = cwd.join("dts");
|
||||
// ensure we invalidate the build properly.
|
||||
for name in libs.iter() {
|
||||
println!(
|
||||
"cargo:rerun-if-changed={}",
|
||||
path_dts.join(format!("lib.{}.d.ts", name)).display()
|
||||
);
|
||||
}
|
||||
|
||||
// create a copy of the vector that includes any op crate libs to be passed
|
||||
// to the JavaScript compiler to build into the snapshot
|
||||
let mut build_libs = libs.clone();
|
||||
|
@ -125,7 +134,6 @@ fn create_compiler_snapshot(
|
|||
}
|
||||
|
||||
let re_asset = Regex::new(r"asset:/{3}lib\.(\S+)\.d\.ts").expect("bad regex");
|
||||
let path_dts = cwd.join("dts");
|
||||
let build_specifier = "asset:///bootstrap.ts";
|
||||
|
||||
let mut js_runtime = JsRuntime::new(RuntimeOptions {
|
||||
|
|
Loading…
Add table
Reference in a new issue