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

Separate build + transpilation stages #35

Open
karimsa opened this issue Feb 25, 2023 · 0 comments
Open

Separate build + transpilation stages #35

karimsa opened this issue Feb 25, 2023 · 0 comments

Comments

@karimsa
Copy link
Member

karimsa commented Feb 25, 2023

For debugging purposes, minimal transpilation is very useful. I think the best way to achieve this would be to separate the build and transpiling phases, so that we initially cache and build the app with ESNext as the target (i.e. no transpiling).

Then when we serve the app, run it back through esbuild to perform transpiling and try to target the consuming browser. We can parse the user agent string and transform that to an esbuild target (ref for parsing). If we fail to parse, we can always target something like ES2015 which has really wide support.

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

1 participant