diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-02-13 15:34:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-13 15:34:32 +0100 |
commit | f80a1fa7e9f0a865a023be26cd76614faa030433 (patch) | |
tree | 31d8a1699994641d41303380e2ac0dede132be9b /cli | |
parent | 8b5be962f5dad64da1363052a3fcd4432cc08a71 (diff) |
refactor(runtime): reorganize build script for snapshot (#17760)
This commit reorganizes "runtime/build.rs" to properly create an
extension and conditionally include "99_main.js" in the snapshot.
Diffstat (limited to 'cli')
-rw-r--r-- | cli/build.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cli/build.rs b/cli/build.rs index d54e22be8..752b80635 100644 --- a/cli/build.rs +++ b/cli/build.rs @@ -351,8 +351,13 @@ fn create_cli_snapshot(snapshot_path: PathBuf) { specifier: "runtime/js/99_main.js".to_string(), code: deno_runtime::js::SOURCE_CODE_FOR_99_MAIN_JS, }); - let extensions_with_js = - vec![Extension::builder("cli").esm(esm_files).build()]; + 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()]; create_snapshot(CreateSnapshotOptions { cargo_manifest_dir: env!("CARGO_MANIFEST_DIR"), |