Mercury
Mercury
NNuxt
Created by Mercury on 9/6/2024 in #❓・help
Error when trying add modules using Nuxt DevTools in browsers
Hello, I apologize for asking this, but I need help migrating from Nuxt 2 to Nuxt 3. Currently, I'm using Nuxt 3.13.1 with Vuetify as the UI framework. However, when I tried to add modules using DevTools, I encountered this error.
ERROR Casting "BlockStatement" is not supported 20.36.28

12 | },
13 | modules: [
14 | (_options, nuxt) => {
^
15 | nuxt.hooks.hook("vite:extendConfig", (config) => {
16 | // @ts-expect-error
17 | config.plugins.push(vuetify({ autoImport: true }));



12 | },
13 | modules: [
14 | (_options, nuxt) => {
^
15 | nuxt.hooks.hook("vite:extendConfig", (config) => {
16 | // @ts-expect-error
17 | config.plugins.push(vuetify({ autoImport: true }));
ERROR Casting "BlockStatement" is not supported 20.36.28

12 | },
13 | modules: [
14 | (_options, nuxt) => {
^
15 | nuxt.hooks.hook("vite:extendConfig", (config) => {
16 | // @ts-expect-error
17 | config.plugins.push(vuetify({ autoImport: true }));



12 | },
13 | modules: [
14 | (_options, nuxt) => {
^
15 | nuxt.hooks.hook("vite:extendConfig", (config) => {
16 | // @ts-expect-error
17 | config.plugins.push(vuetify({ autoImport: true }));
Because in vuetify docs, I need to add the modules like this
modules: [
(_options, nuxt) => {
nuxt.hooks.hook("vite:extendConfig", (config) => {
// @ts-expect-error
config.plugins.push(vuetify({ autoImport: true }));
});
},
//...
],
modules: [
(_options, nuxt) => {
nuxt.hooks.hook("vite:extendConfig", (config) => {
// @ts-expect-error
config.plugins.push(vuetify({ autoImport: true }));
});
},
//...
],
so any solutions for that's guys what should I do? or should I just remove the modules?
1 replies