-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
ESM Code Splitting Imports #2489
Comments
There’s nothing in the docs about this because this isn’t something esbuild does. You can do this by instead passing Can you say more about your use case? Why do you want to do this instead of bundling? |
I'm looking to share a module in memory across multiple entry points, make use of asynchronous loading of said modules, and not duplicate code in the outputs. So in the above example, I'd like to have a third file, Sounds like I'll need to declare all my files as entry points in order to accomplish what I'm trying to do? Might need to get creative with files that import a node_module... |
Yeah, I guess #708 is indeed what I'm looking for. Thank you. |
Apologies if this is a very obvious question, but I couldn't find anything in the docs to explain this:
I'm looking to use esbuild to generate
esm
formatted output without bundling. As a simple case, I tried this.a.ts
b.ts
esbuild a.ts --outdir=out --format=esm
I was expecting to see both a
a.js
andb.js
file in myout
dir. Instead I only geta.js
a.js
And of course, that import now refers to a non-existent b.js file.
It seems like esbuild is treating all files as external by default. What setting do I need to set to get esbuild to ouput a
b.js
file (and any other imports) as well?EsBuild version 0.15.5
The text was updated successfully, but these errors were encountered: