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

Can you elaborate on plugin architecture, or show an example? SASS support would be nice! #497

Closed
rw3iss opened this issue Oct 30, 2020 · 5 comments

Comments

@rw3iss
Copy link

rw3iss commented Oct 30, 2020

Hi, I think I read a post here not long ago with some pseudo-code for a plugin architecture with esbuild.
Has that actually been implemented, or is there any idea of when it might be, @evanw ? Just wondering.

esbuild nearly does all things most frontend devs need, already... transpiling TSX, JSX, bundling, minifying... and now it has CSS support, but I don't know any devs who use plain CSS these days... we all mostly use SASS, so I think it'd be great to show some plugin code to try and compile the sass to css, or otherwise a suggestion on how to get around that.

For now we could possibly just include .css files in our JSX or any code, and the sass files themselves could be watched and then compiled to those css files (ie. a gulp script watcher or something), but I would rather implement something in terms of a plugin through esbuild directly, if that might be possible. I'm wondering if there might be some intention to do that, or if it won't matter what the plugins do internally (ie. arbitrary function... sure we can implement the sass->css on our own, I think). I know you just added css support recently, so not trying to push for this so much, happy to wait, but would like to know if the plugin architecture is there or when it might be.

@EMH333
Copy link

EMH333 commented Oct 30, 2020

Go ahead and check out #111 which is the tracking issue for the plugin system. From my understanding it's the next thing up in the roadmap (source) so keep your eyes open!

It looks like the points you have made here are already covered in #111 but take a look just to be sure.

Additionally if you really want to try the bleeding edge plugin API, there is the plugin branch although it is considered unstable at this point.

@rw3iss
Copy link
Author

rw3iss commented Oct 30, 2020

Thank you @EMH333, I will go through and experiment tomorrow.

@evanw
Copy link
Owner

evanw commented Nov 11, 2020

Plugin documentation is up now: https://esbuild.github.io/plugins/. Hopefully that should be sufficient. Let me know if you have any questions.

@evanw evanw closed this as completed Nov 11, 2020
@rw3iss
Copy link
Author

rw3iss commented Nov 11, 2020

https://esbuild.github.io/plugins/

Awesome, thank you Evan!

@austintraver
Copy link

Plugin documentation is up now: https://esbuild.github.io/plugins/. Hopefully that should be sufficient.

@evanw Thank you for writing this it has been very helpful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants