Auto code splitting - does component need to be defined in route file?
Hello! I need clarification on the automatic code splitting feature.
Current Pattern:
The Docs Say:
"Route properties like component, loader, etc., should not be exported from the route file. Exporting these properties results in them being bundled into the main application bundle, which means that they will not be code-split."Example from docs: Question: Does this mean the component MUST be defined in the route file (not imported) for auto code splitting to work? Should I refactor to this instead? If yes, is this the recommended approach even for large pages? Or is there a better pattern to maintain separation while keeping auto code splitting? Thanks! 🙏
0 Replies