Skip to content
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

esbuild plugin #83

Closed
mohamedmansour opened this issue Dec 7, 2023 · 6 comments
Closed

esbuild plugin #83

mohamedmansour opened this issue Dec 7, 2023 · 6 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@mohamedmansour
Copy link

Is your feature request related to a problem? Please describe.
I use esbuild to build my web apps, and need stylex to generate the css for me.

Describe a solution you'd like
esbuild plugin

Describe alternatives you've considered
Reverting to webpack again which I don't want.

@mohamedmansour mohamedmansour changed the title ESBuild Plugin esbuild plugin Dec 7, 2023
@nmn nmn added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Dec 7, 2023
@nmn
Copy link
Contributor

nmn commented Dec 7, 2023

The work to create a Vite plugin is underway. We can tackle this after that is done.

@mohamedmansour
Copy link
Author

The work to create a Vite plugin is underway. We can tackle this after that is done.

Thank you! Will that by any chance include Module support instead of CommonJS?

@nedjulius nedjulius mentioned this issue Dec 9, 2023
2 tasks
@nmn
Copy link
Contributor

nmn commented Dec 9, 2023

We have a POC for a Vite plugin that works with Qwik. Qwik relies on SSR in a way that is similar to Next App dir, so Making Qwik would imply that it should work with most Vite apps.

https://github.com/nmn/qwik-stylex

I will be porting this to a few additional Vite frameworks to verify that it works as expected.

@mohamedmansour We will use the cannonical module system for the bundler in question. When in doubt we compile to CJS because Node let's you import CJS from ESM but not vice versa.

@eryue0220
Copy link

I have written the plugin through unplugin to support: rspack, esbuild and vite. The repo is here.

But there is in a primitive stage, and there are still many things to complete.

Any questions DM me, or commit an issue in the repo.

Thanks~

@nmn
Copy link
Contributor

nmn commented Jan 10, 2024

An Esbuild plugin is available as 0.5.0-alpha.2 please see if it works for your use-cases.

@nmn nmn closed this as completed Jan 10, 2024
@nmn
Copy link
Contributor

nmn commented Jan 10, 2024

Fixed in #319

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants