Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: deprecate jsxTemplates #2677

Merged
merged 1 commit into from Apr 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -59,6 +59,9 @@
},
"narrowingTypesInInlineHandlers": {
"deprecated": true
},
"jsxTemplates": {
"deprecated": true
}
}
}
Expand Down
5 changes: 0 additions & 5 deletions packages/vue-language-core/schemas/vue-tsconfig.schema.json
Expand Up @@ -19,11 +19,6 @@
"default": [ ".vue" ],
"markdownDescription": "Valid file extensions that should be considered as regular Vue SFC, please note that you should not use this option separately for additional file extensions IDE support, see https://github.com/johnsoncodehk/volar/tree/master/packages/vscode-vue/README.md#custom-file-extensions."
},
"jsxTemplates": {
"type": "boolean",
"default": false,
"markdownDescription": "Whether to compile template to JSX. (Generics component type checking only working with JSX)"
},
"strictTemplates": {
"type": "boolean",
"default": false,
Expand Down
7 changes: 1 addition & 6 deletions packages/vue-language-core/src/generators/script.ts
Expand Up @@ -80,12 +80,7 @@ export function generate(
PropsChildren: false,
};

if (vueCompilerOptions.jsxTemplates && vueCompilerOptions.target >= 3.3) {
codes.push(`/** @jsxImportSource vue */\n`);
}
else {
codes.push('/** __vue_virtual_code_placeholder */\n');
}
codes.push('/** __vue_virtual_code_placeholder */\n');

let generatedTemplate = false;

Expand Down