Can't build in a Nuxt 3 project
nkCreation opened this issue · comments
Nicolas L. commented
Hello!
Thank you for your amazing work. The plugin works perfectly in development but during build I have the following error:
ERROR Error loading virtual:svg-icons-register: plugin load hook should return a string, a { code, map } object, or nothing/null
I use a Nuxt 3 project with Vite and load the plugin in a plugins/svg-icons.js
(because I can't edit the main.ts file) with:
import "virtual:svg-icons-register";
export default defineNuxtPlugin(nuxtApp => {
// Nothing to do here for the moment...
})
Do you have any ideas?
Thank you!
老毕登 commented
same issue
Nicolas L. commented
Hi @Bisheng940924. I've just updated to the Nuxt 3.0.0-rc.3 and it fix the problem.
See nuxt/nuxt#13921
老毕登 commented
@nkCreation thanks!