We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello 馃憢,
When using default export, and running vite build, I got this error :
vite build
error TS2322: Type '{ class: string; }' is not assignable to type 'IntrinsicAttributes'. Property 'class' does not exist on type 'IntrinsicAttributes'.
I do not have this error when running dev server / or using named imports. I am running Preact.
// tsconfig.json { "compilerOptions": { "target": "ESNext", "useDefineForClassFields": true, "lib": ["DOM", "DOM.Iterable", "ESNext"], "allowJs": false, "skipLibCheck": true, "esModuleInterop": false, "allowSyntheticDefaultImports": true, "strict": true, "forceConsistentCasingInFileNames": true, "module": "ESNext", "moduleResolution": "Node", "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, "jsx": "react-jsx", "jsxImportSource": "preact", "baseUrl": ".", "types": [ "vite/client", "vite-plugin-svgr/client" ], "paths": { "@/*" : ["src/*"], "react": ["./node_modules/preact/compat/"], "react-dom": ["./node_modules/preact/compat/"] }, "typeRoots": ["node_modules/@types", "src/@types"], }, "include": ["src"], "references": [{ "path": "./tsconfig.node.json" }] }
// vite.config.ts plugins: [ preact(), svgr({ exportAsDefault: true, svgrOptions: { svgoConfig: { prefixIds: false } } }), ],
// svg.d.ts /// <reference types="vite-plugin-svgr/client" /> declare module "*.svg" { const content: any; export default content; }
The text was updated successfully, but these errors were encountered:
see here 44
Sorry, something went wrong.
Add the following to your tsconfig:
{ "compilerOptions": { "types": ["vite/client", "vitest/globals", "vite-plugin-svgr/client"], } } }
No branches or pull requests
Hello 馃憢,
When using default export, and running
vite build
, I got this error :I do not have this error when running dev server / or using named imports.
I am running Preact.
The text was updated successfully, but these errors were encountered: