diff options
Diffstat (limited to 'runtime.ts')
-rw-r--r-- | runtime.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/runtime.ts b/runtime.ts index 1b1e309b5..9ca3b4944 100644 --- a/runtime.ts +++ b/runtime.ts @@ -11,6 +11,7 @@ import * as util from "./util"; import { log } from "./util"; import * as os from "./os"; import "./url"; +import * as sourceMaps from "./v8_source_maps"; const EOL = "\n"; @@ -18,6 +19,17 @@ const EOL = "\n"; type AmdFactory = (...args: any[]) => undefined | object; type AmdDefine = (deps: string[], factory: AmdFactory) => void; +sourceMaps.install({ + installPrepareStackTrace: true, + getGeneratedContents: (filename: string): string => { + util.log("getGeneratedContents", filename); + if (filename === "dist/main.js") { + return null; + } + return FileModule.load(filename).outputCode; + } +}); + // This class represents a module. We call it FileModule to make it explicit // that each module represents a single file. // Access to FileModule instances should only be done thru the static method |