Skip to content

Commit fe7bd5d

Browse files
feat(vue-tsc): unsupport tracing (#2378)
1 parent f75bde9 commit fe7bd5d

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

packages/vue-tsc/bin/vue-tsc.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ fs.readFileSync = (...args) => {
1414
tryReplace(/supportedJSExtensions = .*(?=;)/, s => s + '.concat([[".vue"]])');
1515
tryReplace(/allSupportedExtensions = .*(?=;)/, s => s + '.concat([[".vue"]])');
1616

17-
// proxy startTracing, dumpTracingLegend
18-
tryReplace(/ = tracingEnabled\./g, ` = require(${JSON.stringify(proxyApiPath)}).loadTsLib().`);
19-
2017
// proxy createProgram apis
2118
tryReplace(/function createProgram\(.+\) {/, s => s + ` return require(${JSON.stringify(proxyApiPath)}).createProgram(...arguments);`);
2219

packages/vue-tsc/src/index.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ export function createProgram(options: ts.CreateProgramOptions) {
2222
if (!options.options.noEmit && options.options.noEmitOnError)
2323
throw toThrow('noEmitOnError is not supported');
2424

25+
if (options.options.extendedDiagnostics || options.options.generateTrace)
26+
throw toThrow('--extendedDiagnostics / --generateTrace is not supported, please run `Write Virtual Files` in VSCode to write virtual files and use `--extendedDiagnostics` / `--generateTrace` via tsc instead of vue-tsc to debug.');
27+
2528
if (!options.host)
2629
throw toThrow('!options.host');
2730

@@ -153,10 +156,6 @@ export function createProgram(options: ts.CreateProgramOptions) {
153156
return program;
154157
}
155158

156-
export function loadTsLib() {
157-
return ts;
158-
}
159-
160159
function toThrow(msg: string) {
161160
console.error(msg);
162161
return msg;

0 commit comments

Comments
 (0)