diff options
Diffstat (limited to 'cli/tsc/99_main_compiler.js')
-rw-r--r-- | cli/tsc/99_main_compiler.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cli/tsc/99_main_compiler.js b/cli/tsc/99_main_compiler.js index e1b7b462c..b4b5398bc 100644 --- a/cli/tsc/99_main_compiler.js +++ b/cli/tsc/99_main_compiler.js @@ -534,6 +534,9 @@ delete Object.prototype.__proto__; // createLanguageService will call this immediately and cache it return new CancellationToken(); }, + getProjectVersion() { + return ops.op_project_version(); + }, getSourceFile( specifier, languageVersion, @@ -584,6 +587,9 @@ delete Object.prototype.__proto__; ); sourceFile.moduleName = specifier; sourceFile.version = version; + if (specifier.startsWith(ASSETS_URL_PREFIX)) { + sourceFile.version = "1"; + } sourceFileCache.set(specifier, sourceFile); scriptVersionCache.set(specifier, version); return sourceFile; @@ -721,6 +727,9 @@ delete Object.prototype.__proto__; if (logDebug) { debug(`host.getScriptVersion("${specifier}")`); } + if (specifier.startsWith(ASSETS_URL_PREFIX)) { + return "1"; + } // tsc requests the script version multiple times even though it can't // possibly have changed, so we will memoize it on a per request basis. if (scriptVersionCache.has(specifier)) { |