You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I can't seem to get complex-types working for my Vue/Vite/Typescript project build, am currently still noticing the error mentioned in the vue core #8286 issue during the vite build step. Wondering if it could be an issue with my vite configuration which you can see below.
One thing I'm a little confused about is which version of complex-types I should be using in my Vite config, since I'm expecting complex-types to be applied during the build step, and Vite uses rollup for the build step. I'm currently including complex-types as a rollup plugin in my vite.config.ts
Output
error during build:
Error: [vite:vue] [@vue/compiler-sfc] Failed to resolve extends base type.
If this previously worked in 3.2, you can instruct the compiler to ignore this extend by adding /* @vue-ignore */ before it, for example:
interface Props extends /* @vue-ignore */ Base {}
Note: both in 3.2 or with the ignore, the properties in the base type are treated as fallthrough attrs at runtime.
/workspace/src/Button/MyButton.vue
6 | import { ButtonHTMLAttributes } from "vue";
7 |
8 | interface MyButtonProps extends ButtonHTMLAttributes {
| ^^^^^^^^^^^^^^^^^^^^
9 | label: string;
10 | }
file: /workspace/src/Button/MyButton.vue
at ScriptCompileContext.error (/workspace/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:15575:11)
at resolveInterfaceMembers (/workspace/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:18036:13)
at innerResolveTypeElements (/workspace/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:17813:14)
at resolveTypeElements (/workspace/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:17799:20)
at innerResolveTypeElements (/workspace/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:17866:16)
at resolveTypeElements (/workspace/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:17799:20)
at resolveRuntimePropsFromType (/workspace/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:19324:20)
at extractRuntimeProps (/workspace/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:19300:17)
at genRuntimeProps (/workspace/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:19288:18)
at Object.compileScript (/workspace/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:20384:21)
Describe the bug
Hi, I can't seem to get complex-types working for my Vue/Vite/Typescript project build, am currently still noticing the error mentioned in the vue core #8286 issue during the
vite build
step. Wondering if it could be an issue with my vite configuration which you can see below.One thing I'm a little confused about is which version of
complex-types
I should be using in my Vite config, since I'm expectingcomplex-types
to be applied during the build step, and Vite uses rollup for the build step. I'm currently includingcomplex-types
as a rollup plugin in myvite.config.ts
Output
package.json
vite.config.ts
Reproduction
https://codesandbox.io/p/devbox/rrzs2y
System Info
N/A
Used Package Manager
npm@10.2.4
The text was updated successfully, but these errors were encountered: