]> git.ipfire.org Git - thirdparty/vuejs/core.git/commit
feat(types/jsx): support jsxImportSource, avoid global JSX conflict (#7958)
authorEvan You <yyx990803@gmail.com>
Sun, 26 Mar 2023 08:40:53 +0000 (16:40 +0800)
committerGitHub <noreply@github.com>
Sun, 26 Mar 2023 08:40:53 +0000 (16:40 +0800)
commitd0b7ef3b61d5f83e35e5854b3c2c874e23463102
treeee3ba33b9887e70ba0f0f9e9ceeafe09a65812b4
parent9dd98f00f26c95aa086dd61e8c7e3f32270d118f
feat(types/jsx): support jsxImportSource, avoid global JSX conflict (#7958)

- No longer implicitly register global JSX types by default
  - This avoid conflict when using Vue in the same project with React
  - Global registration must now be done by explicitly importing /
    referencing `vue/jsx`, or listing it in `compilerOptions.types`.
- Add `vue/jsx-runtime` to support `jsxImportSource` usage
  - Can enable globally by setting `compilerOptions.jsxImportSource` to `'vue'`
  - Can also opt-in per-file with `/** @jsxImportSource vue */`
packages/dts-test/utils.d.ts
packages/vue/jsx-runtime/dom.d.ts [moved from packages/runtime-dom/types/jsx.d.ts with 97% similarity]
packages/vue/jsx-runtime/index.d.ts [new file with mode: 0644]
packages/vue/jsx-runtime/index.js [new file with mode: 0644]
packages/vue/jsx-runtime/index.mjs [new file with mode: 0644]
packages/vue/jsx-runtime/package.json [new file with mode: 0644]
packages/vue/jsx.d.ts [new file with mode: 0644]
packages/vue/package.json
tsconfig.json