Skip to content

Commit

Permalink
refactor: deprecate jsxTemplates (#2677)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Apr 22, 2023
1 parent 3f9b541 commit ae0606c
Show file tree
Hide file tree
Showing 7 changed files with 130 additions and 275 deletions.
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

0 comments on commit ae0606c

Please sign in to comment.