File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import { IOptions } from "./ioptions";
1010import { Partial } from "./partial" ;
1111import { parseTsConfig } from "./parse-tsconfig" ;
1212import { printDiagnostics } from "./print-diagnostics" ;
13- import { TSLIB , tslibSource , tslibVersion } from "./tslib" ;
13+ import { TSLIB , TSLIB_VIRTUAL , tslibSource , tslibVersion } from "./tslib" ;
1414import { blue , red , yellow , green } from "colors/safe" ;
1515import { dirname , isAbsolute , join , relative } from "path" ;
1616import { normalize } from "./normalize" ;
@@ -125,7 +125,7 @@ const typescript: PluginImpl<Partial<IOptions>> = (options) =>
125125 resolveId ( this : PluginContext , importee : string , importer : string | undefined )
126126 {
127127 if ( importee === TSLIB )
128- return "\0" + TSLIB ;
128+ return TSLIB_VIRTUAL ;
129129
130130 if ( ! importer )
131131 return ;
@@ -162,7 +162,7 @@ const typescript: PluginImpl<Partial<IOptions>> = (options) =>
162162
163163 load ( id : string )
164164 {
165- if ( id === "\0" + TSLIB )
165+ if ( id === TSLIB_VIRTUAL )
166166 return tslibSource ;
167167
168168 return null ;
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import { readFileSync } from "fs";
22
33// The injected id for helpers.
44export const TSLIB = "tslib" ;
5+ export const TSLIB_VIRTUAL = "\0tslib.js" ;
56export let tslibSource : string ;
67export let tslibVersion : string ;
78try
You can’t perform that action at this time.
0 commit comments