stackblitz / webcontainer-core

Dev environments. In your web app.
https://webcontainers.io
MIT License
3.7k stars 139 forks source link

Qwik + Vite example failing #1221

Open userquin opened 8 months ago

userquin commented 8 months ago

Describe the bug

I'm trying to add SB links to fork unplugin-icons examples for reproduction issues, the Qwik example doesn't work (it works on local).

HMR seems to be not working, this another SB example adds some server options (you can also check in the linked SB repro there are some WS errors, such as undefined ports): https://stackblitz.com/edit/unplugin-unplugin-icons-ibivn8

Link to the blitz that caused the error

https://stackblitz.com/edit/unplugin-unplugin-icons-h3iqbu

Steps to reproduce

Once dev server starts, you will see the error.

Expected behavior

It should display a simple text with an svg icon (using unplugin-icons)

Parity with Local

Screenshots

SB error:

imagen

Local dev server:

imagen

Platform

On my local:

Additional context

The example can be found here (to run it in SB we need to update some depenedencies, check the .stackblitz.js script): https://github.com/unplugin/unplugin-icons/tree/main/examples/vite-qwik

The modified example can be found in this another branch (PR here https://github.com/unplugin/unplugin-icons/pull/315): https://github.com/unplugin/unplugin-icons/tree/userquin/docs-add-stackblitz-links/examples/vite-qwik

userquin commented 8 months ago

Same error with QwikCity: https://stackblitz.com/edit/qwik-starter-naqri5

userquin commented 8 months ago

It seems a problem with eval + import in @svgx/core package: I've it working on this SB repo using @svgr/core + @svgr/plugin-jsx, check the custom icon compiler in the vite config file