stealjs / rfcs

A place to discuss higher level changes to Steal
MIT License
2 stars 0 forks source link

RFC: Production loader #5

Closed matthewp closed 7 years ago

matthewp commented 7 years ago

This adds the RFC for a minimal production loader.

Rendered

frank-dspeed commented 7 years ago

Oh One More thing can we some how dedublicate ? because when a component uses jquery 3.1 already we shouldn't load it 50 times

matthewp commented 7 years ago

Oh One More thing can we some how dedublicate ? because when a component uses jquery 3.1 already we shouldn't load it 50 times

This should already be the case, but regardless module resolution is not within the scope of this RFC.

pYr0x commented 7 years ago

What's about tree shaking, like rollup do? I think for the first step we only can except commenjs scripts and do no transpiling. What do you think? @matthewp

matthewp commented 7 years ago

Do you mean in regards to this proposal? I don't think it would affect this proposal at all, if we supported tree-shaking then each module definition in this new loader would just not contain the code that was tree-shaken away.

If you want to suggest adding tree-shaking (something I would support) we can talk about it in a new issue here if you want.

pYr0x commented 7 years ago

Yep, I thought that this RFCS was to minimize the production loader. But yes you are right, my suggestion does not affect this proposal.

Could please so kind as to create a nee issue that describe the new proposal I have no idea how to implement such a big feature... rollup has a huge codebase behind this feature with multiple plugins for tree shaking.

matthewp commented 7 years ago

This issue is to minimize the size of production loader, which today is steal.production.js. Minimizing the size of bundles can be fixed in parallel to this RFC, and there's several things we can do in that area.

You don't have to write up a proposal for tree-shaking, so don't worry about how to implement it (yet). Just opening an issue here can get some discussing going, and then it can evolve into an RFC pr when/if we get that far 🙃

frank-dspeed commented 7 years ago

Ok @matthewp what do we need to get so far :) in my point of view we can combine that with the closed lock file issu and so create the lock file and use it as production map

frank-dspeed commented 7 years ago

or we use it to export it as a property directly into the bundle

matthewp commented 7 years ago

@frank-dspeed I don't follow how a lockfile relates to this, can you explain?

frank-dspeed commented 7 years ago

text/prod-loader.md search for that in this issue via strg +f and then look for justin mayers comment on progressiv loading

frank-dspeed commented 7 years ago

@matthewp also plz look into the following i want that we support that :D!!!!!

http://www.createjs.com/preloadjs

matthewp commented 7 years ago

Here's an issue where SSR performance issues are (partially) caused by slow normalization: https://github.com/donejs/done-component/issues/26.

matthewp commented 7 years ago

We seem to have strong consensus on this one. I'm going to call this as entering the Final comment period (as described in the process).

This issue will remain open for comments for 7 more days, until April 14th. At that time the RFC will be merged (unless there is strong opposition).

Thanks!

frank-dspeed commented 7 years ago

LGTM +1