vue-macros: 'defineOptions' is not defined.
Describe the bug
First of all . thanks for code
Probably a mistake because I missed something, I’m sorry for that
I use this plugin as described in the README 1、npm i unplugin-vue-define-options -D 2、config vite.config.js
import DefineOptions from 'unplugin-vue-define-options/vite'
import Vue from '@vitejs/plugin-vue'
export default defineConfig({
plugins: [Vue(), DefineOptions()],
})
3、config tsconfig.json
{
"compilerOptions": {
// ...
"types": ["unplugin-vue-define-options/macros-global" /* ... */]
}
}
Then vscode
will prompt me 'defineOptions' is not defined.
the defineOptions
does not exist in .eslintrc-auto-import.json
auto-imports.d.ts
Reproduction
https://github.com/yangliguo7/vite-project
System Info
npm run dev
Used Package Manager
npm
Validations
- Follow our Code of Conduct
- Read the Contributing Guide.
- Check that there isn’t already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
- The provided reproduction is a minimal reproducible of the bug.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 18 (9 by maintainers)
Is there only one way to solve this problem? But sometimes I do need eslint to validate my variables.
Why does
defineOptions
not appear in autoimport.ts file