__vite_ssr_import_0__.template is not a function when using vite-plugin-ssr and solid
See original GitHub issueRepro:
- Check out https://github.com/brillout/vite-plugin-ssr/tree/master/examples/solid
- Install vite-plugin-ssr according to instruction and try adding an icon to the index page
import IconAccountBox from '~icons/mdi/account-box'
npm run dev
7:41:10 AM [vite] Error when evaluating SSR module ~icons/mdi/account-box:
TypeError: __vite_ssr_import_0__.template is not a function
at ~icons/mdi/account-box:4:23
at async instantiateModule
@jfgodoy , do you know what could cause this?
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Troubleshooting - Vite
Vite cannot handle and does not support code that only runs on non-strict mode (sloppy mode). This is because Vite uses ESM and...
Read more >Vite/Vue3 throws Internal server error (experimental syntax ...
I use SFC in Vue and vue-class-component and vue-property-decorator for my components. I have updated: vite: 2.6.14 -> 2.9.12 @vitejs/ ...
Read more >vite-plugin-ssr
Use any UI framework (React, Vue, Svelte, Solid, . ... With vite-plugin-ssr , you integrate tools manually and keep architectural control. Learn more....
Read more >@vitejs/plugin-react - npm
The all-in-one Vite plugin for React projects.. Latest version: 3.0.0, last published: 17 days ago. Start using @vitejs/plugin-react in your ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
hi @dephiros, the current implementation doesn’t support ssr. The good news is that I think I figured out how to achieve it. I will send a PR soon
Adding
svg.replace(/([{}])/ig, "{'$1'}")
before the props injecting works for me but it’s a blunt method that might not work in all cases. @jfgodoy @dephiros what do you think?