- create a compiler
- apply options / configuration
- apply plugins listed in options
- add all other plugins based on options / configuration
- example plugin: commonjsplugin
- define dependency module factories
- define dependency templates
- plugin parser to create commonjs dependencies
- run the compiler
- create module factories
- create a Compilation
- "make" the compilation
- according to a plugin added when appling options add a chunk and entry module
- build module
- run loaders on original content
- parse loader output
- through commonjsplugin and other plugins, create dependencies
- build a list of all dependencies for module
- for each dependency
- get a module factory for that dependency
- create a module
- add it to the compilation
- build module
- build module
- according to a plugin added when appling options add a chunk and entry module
- "seal" the compilation
- assign ids to modules and chunks
- most optimization plugins do work here
- transform chunks into assets with the a chunk template
- transform modules with the moduleTemplate
- transform dependencies with their appropriate dependency template
- transform modules with the moduleTemplate
- emit assets to the file system
Created
August 11, 2016 18:17
-
-
Save mzgoddard/1f85329e38c761414b52f9422bb4369f to your computer and use it in GitHub Desktop.
High level steps webpack takes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment