Skip to content

Commit

Permalink
fix: use console.warn instead of console.log (#1046)
Browse files Browse the repository at this point in the history
When using `--stdio` flag, output to stdout by `console.log` may break messages to LSP client
  • Loading branch information
tsukkee committed Mar 15, 2022
1 parent e286a3d commit 4aea634
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/shared/src/ts.ts
Expand Up @@ -139,7 +139,7 @@ function resolveVueCompilerOptions(rawOptions: {
try {
result.experimentalTemplateCompilerOptions = require(templateOptionsPath).default;
} catch (error) {
console.log('Failed to require "experimentalTemplateCompilerOptionsRequirePath":', templateOptionsPath);
console.warn('Failed to require "experimentalTemplateCompilerOptionsRequirePath":', templateOptionsPath);
console.error(error);
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/vue-language-service/src/languageService.ts
Expand Up @@ -516,7 +516,7 @@ export function loadCustomPlugins(dir: string) {
return config.plugins ?? []
}
catch (err) {
console.log('load volar.config.js failed in', dir);
console.warn('load volar.config.js failed in', dir);
return [];
}
}

0 comments on commit 4aea634

Please sign in to comment.