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
I propose that we remove "magic" importing of things. I think it gets rid of one of the advantages and reasons why to use es6 modules. I think we should require people to be explicit about what they are including in their files and mindful of how much stuff they are importing.
Furthermore, it prevents certain bugs that are very hard to debug. For example, let's assume that for whatever reason someone deleted BarComponent that was being used in FooBarModule by FooComponent. If I am not being explicit about importing BarComponent, the only way that I know that it isn't there anymore is that it doesn't render BarComponent at runtime. That is really hard to debug. If I'm explicitly importing BarComponent, the app will fail to build and I will realize that BarComponent is indeed needed and be able to see where it is needed.
The text was updated successfully, but these errors were encountered:
I propose that we remove "magic" importing of things. I think it gets rid of one of the advantages and reasons why to use es6 modules. I think we should require people to be explicit about what they are including in their files and mindful of how much stuff they are importing.
Furthermore, it prevents certain bugs that are very hard to debug. For example, let's assume that for whatever reason someone deleted BarComponent that was being used in FooBarModule by FooComponent. If I am not being explicit about importing BarComponent, the only way that I know that it isn't there anymore is that it doesn't render BarComponent at runtime. That is really hard to debug. If I'm explicitly importing BarComponent, the app will fail to build and I will realize that BarComponent is indeed needed and be able to see where it is needed.
The text was updated successfully, but these errors were encountered: