-
Notifications
You must be signed in to change notification settings - Fork 737
basic code splitting #22
Copy link
Copy link
Closed
Description
Summary
The following will trigger code splitting.
- entries
- shared module
- dynamic import
- manual chunks option
Split Modules to chunk by entries
- Mark an entry that has a corresponding bit flag.
- Mark the entry bit flag of the module by iter entries. The entry bits flag of the module may be imported by multiple entries bit flag.
- Generate chunks for entries, and add the corresponding bit flag to the chunk.
- Iter modules to compare the entry bit flag of the module with the entry bit flag of already generated chunks.
- If a chunk has an equal entry bit flag of the module and connect the module with the chunk.
- Else generate a new chunk for the entry bit flag of the module and connect the module with the chunk.
Cross chunks symbol imports and exports
Dynamic import module generate a chunk
Scanned the dynamic import module added to entries.
Step implementation
- split Modules to chunk by entries
- cross chunks symbol imports and exports
- dynamic import as entries
- manual chunk object
- manual chunk function
Reactions are currently unavailable
Metadata
Metadata
Labels
No labels
Type
Fields
Give feedbackPriority
None yet