SVG ?include does not work anymore
MattCCC opened this issue · 1 comments
MattCCC commented
Hello, firstly thank you for a great plugin! I really appreciate your work especially if it comes it svg loader and optimizations. It seems like svg ?include
for inlining svgs doesn't work anymore in latest nuxt 2.15.7
. I use follow config:
optimizedImages: {
optimizeImages: true,
imagesName: ({ isDevMode }) =>
isDevMode ? "[path][name][hash:optimized].[ext]" : "[path][name].[ext]",
webp: {
preset: "default",
quality: 50,
},
},
This is what I get when I try to require an SVG:
ERROR in ./static/svg ?include sync ^\.\/.*\.svg$
Module not found: Error: Can't resolve 'img-loader' in '/path_cut'
@ ./static/svg ?include sync ^\.\/.*\.svg$
@ ./utils/svg-renderer.js
@ ./node_modules/babel-loader/lib??ref--16-0!./node_modules/ts-loader??ref--16-1!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./pages/index.vue?vue&type=script&lang=ts&
@ ./pages/index.vue?vue&type=script&lang=ts&
@ ./pages/index.vue
@ ./.nuxt/router.js
@ ./.nuxt/index.js
@ ./.nuxt/server.js
@ multi ./node_modules/@nuxt/components/lib/installComponents.js ./.nuxt/server.js
dfl-zeke commented
This issue still persists. Have you found any way to avoid this error?