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
{{ message }}
This repository was archived by the owner on Jan 11, 2023. It is now read-only.
Piping all exports to/from core/index.ts results in all of core being used everywhere.
As with #114, because of the scope/import-hoisting, all files' immediate prep work is called instantly, regardless of what the CLI or runtime actually wants.
In practice, this means that something like core/export.ts is always initiated & running, even during production-mode as a middleware!!!
AKA, something as big/heavy as Express is always running, even if you don't want it!
As much as I love Rollup (seriously, it's the best!), I don't believe it should be used in compiling Node.js CLIs and runtimes. I see this issue happen a lot and often.
Opinions aside, this can be solved by removing the core/index.ts aggregator in favor of direct imports — we are using Rollup, so why not? We should also be moving most/all of the prep-work inside the actual export. This will prevent things from being called & prepped until we actually want them to.
I don't have time to do this today, sorry! But happy to tackle it, if no one else has, once my schedule opens up~!
The text was updated successfully, but these errors were encountered:
Gah, whoops. Good catch, thanks. Aside from TypeScript, one of the reasons I moved towards bundling was for marginally faster startup times, so it's ironic if I inadvertently made things slower.
Piping all exports to/from
core/index.ts
results in all of core being used everywhere.As with #114, because of the scope/import-hoisting, all files' immediate prep work is called instantly, regardless of what the CLI or runtime actually wants.
In practice, this means that something like
core/export.ts
is always initiated & running, even during production-mode as a middleware!!!As much as I love Rollup (seriously, it's the best!), I don't believe it should be used in compiling Node.js CLIs and runtimes. I see this issue happen a lot and often.
Opinions aside, this can be solved by removing the
core/index.ts
aggregator in favor of direct imports — we are using Rollup, so why not? We should also be moving most/all of the prep-work inside the actual export. This will prevent things from being called & prepped until we actually want them to.The text was updated successfully, but these errors were encountered: