-
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
[UX] esbuild does not compile imported files #1513
Comments
The main advantage of combining multiple files to one big one (=bundling) is that it reduces the amount of network requests if loaded in the browser or files to read from disk if loaded inside node. In node's case it probably only makes sense if one has enough files to warrant that optimization. Most projects don't fall into that category.
The
What you're looking for is a way to transpile all files in a folder. That is something that is currently not supported out of the box by esbuild, as the main goal of esbuild is to be a bundler. Instead you can use a quick bash or node script to collect all files you want to transpile and pass them to esbuild as seen in this comment. But what you can do is use a quick bash or node script to collect all files you want to transpile and pass that list to esbuild. |
Closing this issue due to age, and because this request is already tracked by other open issues (e.g. #708). |
I guess I got this totally wrong:
Pls check https://github.com/205g0/strange and run
pnpm i
, thenpnpm run dev
, you only getindex.ts
compiled toindex.js
but notlib.ts
indist
.Once you add
--bundle
topackage.json
'sdev
script, lib is included/bundled intoindex.js
. I understood from the docs that bundling brings some advantages even to the node side of things.Ok, got that, but what do I do if I don't want to bundle?
--splitting
? Tried and got again nolib.ts
compiled...So, what do I miss?
The text was updated successfully, but these errors were encountered: