can I import a `named export` while lazy loading the `default export`?
Not sure how lazy loading works, I want to ask if this breaks lazy loading:
3 Replies
Well this doesn’t make sense.
Since importing on top level will result in the components code being bundled to the file, so there’s no point of lazy loading it then because it’s already loaded.
Doesn't it depend on the kind of code splitting and tree shaking they're using?
Well if your app root imports a component. And the app root is used in any route. Then lazy loading the same component on a specific route does not reduce the base bundle.
But give it a try and check the bundle. Then you know for sure.