Skip to content

Conversation

@RavenColEvol
Copy link
Contributor

What changed / motivation ?

I was just going over the repo to see if I can make any contribution. Found that esbuild example doesn't have any way for me to preview the build or do dev changes.

Linked PR/Issues

Fixes # (issue)

Additional Context

Screenshots, Tests, Anything Else
https://github.com/user-attachments/assets/ce55b1ac-cba1-4844-b7a7-c9e5e620eb8b

  • Tested both dev and preview mode

Pre-flight checklist

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 14, 2025
@nmn
Copy link
Collaborator

nmn commented Sep 15, 2025

This change will take a little longer for me to review because I'm not super familiar with how esbuild works, but things look pretty good so far. Thank you!

@RavenColEvol
Copy link
Contributor Author

Sure @nmn I'm also not super familiar with esbuild. What I did was kept these requirements in mind and simply started exploring how it can be achieved in esbuild through there documentation.

Requirements:

  1. User should be able to use dev mode: I wanted to achieve HMR ( hot module replacement ) but got to learn that esbuild don't support HMR so I used there watch mode + live reload https://esbuild.github.io/api/#live-reload
  2. User should be able to serve the build to test production bundle: They have serve mode https://esbuild.github.io/api/#serve.

@BMCwebdev
Copy link

Sorry to butt in here, but curious as I have recently been working in an app that uses ESBuild and StyleX. I thought the StyleX ESBuild plugin was deprecated?

Nice work adding in a watch btw.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants