systemjs / systemjs

Dynamic ES module loader

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiple dependencies bundled in one file (previously "bundles" config option)

MBelniak opened this issue · comments

  • SystemJS Version:
  • Which library are you using?
    • system.js
    • s.js
    • system-node.cjs
  • Which extras are you using?
    • AMD extra
    • Named Exports
    • Named Register
    • Transform
    • Use Default
    • Global
    • Dynamic Import Maps
  • Are you using any custom hooks?

Question

What happened to "bundles" option that I keep seeing in old posts with version 0.x? As I understand, it allowed bundling multiple dependencies in one file and then use one http request to fetch multiple dependencies. Is it disallowed right now because of "one file - one module" idea? I see some clues indicating this idea in #2092 (comment)
IMO it would be beneficial if I could fetch 20 libraries within 4 API calls, especially in microfrontends architecture where I could end up having 50 various shared components. Neither doing 50 requests nor bundling the components is optimal. I know RequireJS has "bundles" option which works really nice, even with webpack where you only really need webpack-concat-plugin.