diff options
Diffstat (limited to 'js/compiler.ts')
-rw-r--r-- | js/compiler.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/js/compiler.ts b/js/compiler.ts index 941691f5c..a6b6e6970 100644 --- a/js/compiler.ts +++ b/js/compiler.ts @@ -388,6 +388,7 @@ export class DenoCompiler let lastModule: ModuleMetaData | undefined; sourceMaps.install({ installPrepareStackTrace: true, + getGeneratedContents: (fileName: string): string | RawSourceMap => { this._log("compiler.getGeneratedContents", fileName); if (fileName === "gen/bundle/main.js") { @@ -419,6 +420,11 @@ export class DenoCompiler } } }); + // Pre-compute source maps for main.js.map. This will happen at compile-time + // as long as Compiler is instanciated before the snapshot is created.. + const consumer = sourceMaps.loadConsumer("gen/bundle/main.js"); + assert(consumer != null); + consumer!.computeColumnSpans(); } private constructor() { |