nuxt.config.ts
import graphql from '@rollup/plugin-graphql'
export default defineNuxtConfig({
...
vite: {
// for Frontend
plugins: [graphql()],
},
nitro: {
rollupConfig: {
// for Backend
plugins: [graphql()],
},
},
});
When added in this way, it works fine in operation.
However, on the VSCode editor, an error is displayed at the graphql() point on the nitro side.
Type instantiation can be very deep and infinite. ts(2589)
(alias) graphql(options?: RollupGraphqlOptions | undefined): Plugin<any>
import graphql
Convert .gql/.graphql files to ES6 modules
Is this an error that only occurs with nuxt.config.ts?
How can I resolve this?
- @rollup/plugin-graphql v2.0.3
- Nuxt v3.7.3
- Nodejs v18.18.0
- macOS 13.5 Apple Silicon M2
nuxt.config.ts
When added in this way, it works fine in operation.
However, on the VSCode editor, an error is displayed at the
graphql()point on the nitro side.Is this an error that only occurs with nuxt.config.ts?
How can I resolve this?