Closed mariusa closed 2 years ago
We temporarily close this due to the lack of enough information. Please provide a minimal reproduction to reopen the issue. Thanks.
Looking at vitesse (thanks for it), found the solution: Add to AutoImport
in vite config:
dts: 'src/auto-imports.d.ts',
for me, it has fixed the problem: add *.d.ts
to tsconfig.json
// tsconfig.json
"include": [
"*.d.ts",
"src/**/*.ts",
"src/**/*.d.ts",
"src/**/*.tsx",
"src/**/*.vue"
],
onMounted
works fine for<script setup>
with vscode, no warnings..eslintrc
hasAdding
lang="ts"
makes vscode show warningcannot find name 'onMounted'
, but$ref
has no warning.How to solve this?
Maybe related to https://github.com/antfu/unplugin-auto-import/issues/61 ?