You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am interested in converting a sizable Webpack (CRA) app to Bun.build and Bun.serve but one requirement is being able to down-level syntax to ensure that it's compatible with our target browsers, which is basically Chrome >= 79: not terribly old but not super fresh. Unfortunately, Babel is really good at this.
At the moment Bun does not attempt to down-convert syntax; if you use recently ECMAScript syntax, that will be reflected in the bundled code.
How would I go about integrating a tool to down-convert syntax in my build? Is there a plugin I can use or a reliable fast library for which I could write my own plugin? My ideal would be to define settings in tsconfig.json like target and module and have the system go from there.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am interested in converting a sizable Webpack (CRA) app to
Bun.build
andBun.serve
but one requirement is being able to down-level syntax to ensure that it's compatible with our target browsers, which is basically Chrome >= 79: not terribly old but not super fresh. Unfortunately, Babel is really good at this.I see this small note in the first row of the table in https://bun.sh/docs/bundler#content-types:
How would I go about integrating a tool to down-convert syntax in my build? Is there a plugin I can use or a reliable fast library for which I could write my own plugin? My ideal would be to define settings in
tsconfig.json
liketarget
andmodule
and have the system go from there.Beta Was this translation helpful? Give feedback.
All reactions