New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v4 alpha does not work on Stackblitz #13133
Comments
Just a note for future us, looks like this is because StackBlitz doesn't support loading native modules: Not sure if there's anything we can do to make this work, maybe we can compile a WASM version and somehow have that get installed in these environments? Will leave this open to investigate for a bit but might ultimately not be something we can solve. |
For lightning css we have a separate WASM package ( |
Hey 👋 Thanks for pinging me @devongovett 🙏 @adamwathan Indeed, you cannot load native addons in WebContainer because arbitrary native binaries cannot be executed in the browser. Therefore, for this to work it requires a Wasm package. Here's a good example for a setup that I'd suggest: https://github.com/Brooooooklyn/Image/blob/95c248a04fa0b748a280be0d9936be18d744221f/packages/binding/index.js#L338-L355. Essentially, you need to define another platform-specific dependency that targets What we have done for I'd recommend taking a look at napi-rs or napi-wasm. Let me know if I can help any further. Happy to collaborate if you need more input or direction. It's important to us to ensure that tailwindcss continues to work in WebContainer. |
What version of Tailwind CSS are you using?
4.0.0-alpha.6
What build tool (or framework if it abstracts the build tool) are you using?
Vite 5.1.5
What version of Node.js are you using?
v18.18.0
What browser are you using?
Chrome
What operating system are you using?
StackBlitz
Reproduction URL
https://stackblitz.com/edit/vitejs-vite-bhcbjy?file=vite.config.js&terminal=dev
A Tailwind Play link or public GitHub repo that includes a minimal reproduction of the bug. Please do not link to your actual project, what we need instead is a minimal reproduction in a fresh project without any unnecessary code. This means it doesn't matter if your real project is private/confidential, since we want a link to a separate, isolated reproduction anyways.
A reproduction is required when filing an issue — any issue opened without a reproduction will be closed and you'll be asked to create a new issue that includes a reproduction. We're a small team and we can't keep up with the volume of issues we receive if we need to reproduce each issue from scratch ourselves.
Describe your issue
The text was updated successfully, but these errors were encountered: