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
When code splitting is not enabled, ESBuild will bundle all dynamic imports together, which is exactly what I want in my scenario. The issue I have is that I need to statically name all modules I want to bundle, while in webpack I can do this:
There's a fork of esbuild by netlify team doing what you said, it provides an extra plugin api build.onDynamicImport to do so.
There's another cheap solution in vite, you can write a plugin to search for specific function call, and then rewrite it to a static map like what you have done.
When code splitting is not enabled, ESBuild will bundle all dynamic imports together, which is exactly what I want in my scenario. The issue I have is that I need to statically name all modules I want to bundle, while in webpack I can do this:
Is there a similar feature in ESBuild? Essentially I want to bundle all
*.page.tsx
into a single bundle and later use §import(pageName).then(...)
.Note: I'm using the output bundle for Server Side Rendering, so having all pages in single build is OK.
The current solution I have is to keep a static map of all pages, which I'm trying to avoid.
The text was updated successfully, but these errors were encountered: