diff options
Diffstat (limited to 'cli/build.rs')
-rw-r--r-- | cli/build.rs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/cli/build.rs b/cli/build.rs index 846224af2..804f1d838 100644 --- a/cli/build.rs +++ b/cli/build.rs @@ -276,8 +276,7 @@ mod ts { cargo_manifest_dir: env!("CARGO_MANIFEST_DIR"), snapshot_path, startup_snapshot: None, - extensions: vec![], - extensions_with_js: vec![tsc_extension], + extensions: vec![tsc_extension], // NOTE(bartlomieju): Compressing the TSC snapshot in debug build took // ~45s on M1 MacBook Pro; without compression it took ~1s. @@ -321,7 +320,7 @@ mod ts { } fn create_cli_snapshot(snapshot_path: PathBuf) { - let extensions: Vec<Extension> = vec![ + let mut extensions: Vec<Extension> = vec![ deno_webidl::init(), deno_console::init(), deno_url::init_ops(), @@ -364,20 +363,21 @@ fn create_cli_snapshot(snapshot_path: PathBuf) { std::path::PathBuf::from(deno_runtime::js::PATH_FOR_99_MAIN_JS), ), }); - let extensions_with_js = vec![Extension::builder("cli") - // FIXME(bartlomieju): information about which extensions were - // already snapshotted is not preserved in the snapshot. This should be - // fixed, so we can reliably depend on that information. - // .dependencies(vec!["runtime"]) - .esm(esm_files) - .build()]; + extensions.push( + Extension::builder("cli") + // FIXME(bartlomieju): information about which extensions were + // already snapshotted is not preserved in the snapshot. This should be + // fixed, so we can reliably depend on that information. + // .dependencies(vec!["runtime"]) + .esm(esm_files) + .build(), + ); create_snapshot(CreateSnapshotOptions { cargo_manifest_dir: env!("CARGO_MANIFEST_DIR"), snapshot_path, startup_snapshot: Some(deno_runtime::js::deno_isolate_init()), extensions, - extensions_with_js, compression_cb: Some(Box::new(|vec, snapshot_slice| { lzzzz::lz4_hc::compress_to_vec( snapshot_slice, |