summaryrefslogtreecommitdiff
path: root/cli/js/compiler_bundler.ts
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-01-22 20:18:01 +0100
committerGitHub <noreply@github.com>2020-01-22 20:18:01 +0100
commitbd9561f4de8f940ce6ed8b5eedfa84161a749c54 (patch)
tree20bc23c294aa3031fe4729dc09e03351ec6097f4 /cli/js/compiler_bundler.ts
parent3c47718959fb38d51e34c64d423151b5326bae3a (diff)
Reland "Create an old program to be used in snapshot." (#3747)
* read CLI assets from disk during snapshotting
Diffstat (limited to 'cli/js/compiler_bundler.ts')
-rw-r--r--cli/js/compiler_bundler.ts14
1 files changed, 1 insertions, 13 deletions
diff --git a/cli/js/compiler_bundler.ts b/cli/js/compiler_bundler.ts
index a4e4557ca..8fb68cc7a 100644
--- a/cli/js/compiler_bundler.ts
+++ b/cli/js/compiler_bundler.ts
@@ -1,7 +1,6 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
-import * as dispatch from "./dispatch.ts";
-import { sendSync } from "./dispatch_json.ts";
+import { bundleLoader } from "./compiler_bootstrap.ts";
import {
assert,
commonPath,
@@ -9,11 +8,6 @@ import {
CHAR_FORWARD_SLASH
} from "./util.ts";
-const BUNDLE_LOADER = "bundle_loader.js";
-
-/** A loader of bundled modules that we will inline into any bundle outputs. */
-let bundleLoader: string;
-
/** Local state of what the root exports are of a root module. */
let rootExports: string[] | undefined;
@@ -40,12 +34,6 @@ export function buildBundle(
data: string,
sourceFiles: readonly ts.SourceFile[]
): string {
- // we can only do this once we are bootstrapped and easiest way to do it is
- // inline here
- if (!bundleLoader) {
- bundleLoader = sendSync(dispatch.OP_FETCH_ASSET, { name: BUNDLE_LOADER });
- }
-
// when outputting to AMD and a single outfile, TypeScript makes up the module
// specifiers which are used to define the modules, and doesn't expose them
// publicly, so we have to try to replicate