Split module into `main` and `core`
See original GitHub issueWe could split the bundle into a core
module and the normal main
one.
We can structure the library so that main
, native
and no-parser
use core
, so that the no-parser
module doesn’t conflict with main
and people can use both alongside each other.
~Furthermore we can make main have the domElements
and support styled.div
, while the styled
export on core
could only support styled('div')
. This way people can decide to make a really tiny bundle, if they need to.~
This would also solve the problem that libraries might not use no-parser
and the user does, or vice versa.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:8 (8 by maintainers)
Top Results From Across the Web
split applications into features, shared and core modules
Organizing an Angular project into ngModules has always been an obstacle for many beginners so I created this short guide to explain and ......
Read more >Dev modules only in dev environments | Configuration Split
Select your development modules from the list in Complete Split. Their configuration will not be included in the main configuration.
Read more >Split into CS and BL | OutSystems
This BL sub-layer will allow you to implement a logic that aggregates these different CS modules. This split is not entirely necessary, it...
Read more >Lern how to split your Angular App into Modules ... - malcoded
Here is a basic AppModule generated by the angular-cli. To generate your own module, open a terminal at the root of your application-project. ......
Read more >python - Recommended ways to split some functionality into ...
Modules are generally grouped somehow, by purpose or functionality. You could try each implementation of an interface, or other connections. Share.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hmm, I don’t mind breaking things apart and I certainly like smaller bundles, but I’d like to keep things grounded a bit. Splitting things in half where there’s a natural division (like core/main) is good, and if that results in a smaller bundle then great, but I don’t think we should be prioritising bundle size over DX, performance, or maintenance complexity. 11kb is fine for a lot of cases, the no-parser one will be even better, and anywhere we can improve weight without compromising the others then go for it. But just keep an eye on the broader goals of the project as you look for opportunities to split things up/slim things down.
That said, core vs main sounds like a good split. I definitely wouldn’t do the
styled("div")
thing though, but hoistingstyled.div
intoimport { div } from 'styled/elements'
could make sense (and will be important for my current whitelisting stuff)@geelen in that case let’s do an elements file first, which should be simple, and a main/core with the goal of no-parser interoperability.
Sounds good? 😃