Portnoy Vladislav

Results 10 comments of Portnoy Vladislav

@jpkleemans Hi! All imports on server-side (raw,url,component) calling error. `500 Cannot read properties of undefined (reading 'stubModule')` On client-side - its working; Code example: ``` let icon = await import(`../../assets/svg/${props.name.toLowerCase()}.svg?component`).then((_)...

> @jpkleemans > > Hi! All imports on server-side (raw,url,component) calling error. > > `500 Cannot read properties of undefined (reading 'stubModule')` > > On client-side - its working; >...

@cdwmhcc you need install plugin `vite-require`; In `vite.config.ts`: ``` import svgLoader from 'vite-svg-loader'; import { viteRequire } from 'vite-require'; export default { ..., plugins: [svgLoader(), viteRequire()] }; ``` and if...

> > @cdwmhcc you need install plugin `vite-require`; > > In `vite.config.ts`: > > ``` > > import svgLoader from 'vite-svg-loader'; > > import { viteRequire } from 'vite-require'; >...

So, somebody resolve this issue? Can't create **Icon.vue** component on the server side, getting same error(

Resolve problem by creating [functional component](https://github.com/jpkleemans/vite-svg-loader/issues/24#issuecomment-1162181560)

So, somebody resolve this issue? Can't create **Icon.vue** component on the server side, getting same error(

Resolve problem by creating [functional component](https://github.com/jpkleemans/vite-svg-loader/issues/24#issuecomment-1162181560)

Thanks for the lightning-fast response and fix! 🤝