-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
How to skip transform javascript code? #674
Comments
It's not currently possible to set the platform to something other than the browser or node. Can you say more about your use case? Which of esbuild's transforms are breaking your code, and how? |
our build tools use two different javascript languages(for different purpose), one of which supports a subset of es3(JS-A), which most transform tools doesn't support, but we support esm by using rollup for now(because rollup doesn't do any transform by default, which meets our needs),and another js language(supports es5+,JS-B) use esbuild as our build tools, so we want also want to use esbuild instead of rollup to build the JS-A,but the transform result may break the code。 |
You can now specify |
It seems that even though I set platform |
Same here. I want to keep consts for example. Is there any way to bundle files without transpilation? I'd like to keep the code as is. |
Why do you want to do this? Is it just for aesthetics? Whenever It is intentionally not possible to keep top-level |
Yeah, it looks like this.
Ok I got it.
Wow, this is interesting. I should rethink the priorities. Thanks! |
my case is very special, our javascript vm implementation does not support |
That is interesting. However, I do not intend for esbuild to include logic for handling JavaScript language subsets like this. Various parts of esbuild's internals may produce |
so esbuild's tranformer function is not opt-in but bound to it's other functionality? |
@evanw , Except |
We use SWC quite a bit, but we also love the bundling functionality that esbuild provides over Webpack. If we could optionally skip the transform step for esbuild given that we use an esbuild SWC plugin, that'd be a perfect setup for us. Is there any chance that such a proposed change would be accepted? |
we want to use esbuild as our build tools(which is super fast), But because our target is not browser and node( an embed Javascript runtime), which transform may break code , so I want to know is there any way to disable transform Javascript code when bundle, thanks。
The text was updated successfully, but these errors were encountered: