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 have a good handle now on how to use Compiler to process a single file.
However, I'm not sure how I would utilize SourceMap and Compiler to compile numerous sources in one operation. Is this possible? It seems like bundling is a separate feature and not primarily worked on by Vercel with Turbopack doing bundling work.
I don't necessarily need a single file bundled from all sources. I'm wondering if I have imports for X number of files from a source file entrypoint, if I should just be doing this code below for each file, which means I would have to read the Program, parse the AST for imports, find the file paths, and then run the compiler.
It doesn't seem like tree shaking would be possible with that approach so I must be missing a higher level API with SourceMap and Compiler.
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 have a good handle now on how to use Compiler to process a single file.
However, I'm not sure how I would utilize SourceMap and Compiler to compile numerous sources in one operation. Is this possible? It seems like bundling is a separate feature and not primarily worked on by Vercel with Turbopack doing bundling work.
I don't necessarily need a single file bundled from all sources. I'm wondering if I have imports for X number of files from a source file entrypoint, if I should just be doing this code below for each file, which means I would have to read the Program, parse the AST for imports, find the file paths, and then run the compiler.
It doesn't seem like tree shaking would be possible with that approach so I must be missing a higher level API with SourceMap and Compiler.
Beta Was this translation helpful? Give feedback.
All reactions