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

feat: transpile browser bundle #197

Open
pi0 opened this issue Dec 6, 2020 · 2 comments
Open

feat: transpile browser bundle #197

pi0 opened this issue Dec 6, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@pi0
Copy link

pi0 commented Dec 6, 2020

🆒 Your use case
Add a description of your use case, and how this feature would help you.

It is totally fine that we push using modern syntax by default. But mostly for browsers, it might be hard for making utilities that requires users to transpile for browser.

🆕 The solution you'd like

Support target option in siroc.config per-entry. (transpiling with esbuild)

target: {
  main: 'node14',
  browser: 'chrome80'
}

(example above is not esbuild valid targets)

🔍 Alternatives you've considered

  • Using babel or a babel based tool like bili
  • Forcing users to transpile

ℹ️ Additional info

@danielroe
Copy link
Owner

nb to self: may be blocked by evanw/esbuild#297

@pi0
Copy link
Author

pi0 commented Dec 7, 2020

If install size is not much matter, bable env (as an outout plugin) may do the trick for browser 😁

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

No branches or pull requests

2 participants