Do not skip processing modules restored from cache#13
Open
Silic0nS0ldier wants to merge 1 commit intostorybookjs:nextfrom
Open
Do not skip processing modules restored from cache#13Silic0nS0ldier wants to merge 1 commit intostorybookjs:nextfrom
Silic0nS0ldier wants to merge 1 commit intostorybookjs:nextfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Inclusion in
compilation.builtModules(which is under documented) does not indicate a module has already been built, usage within plugins included inwebpackconfirms this.The current behaviour lead to an incomplete Storybook build (missing documentation) when our custom cache plugin was enabled. The changes in this PR are already applied internally via a patch.
Examples
lib/Compilation.jsBy default, modules are only added to
compilation.builtModuleswhen the module itself indicates it needs to be built (modules served from the cache viacompiler.cache.hooks.getdo not need to be built).https://github.com/webpack/webpack/blob/34e2561addb0f65a7a6fb0ce7ae1aea4cd1d599f/lib/Compilation.js#L1387-L1405
lib/optimize/ModuleConcatenationPlugin.jsConcatenated modules are only marked as built when an included module is included in
compilation.builtModules.https://github.com/webpack/webpack/blob/34e2561addb0f65a7a6fb0ce7ae1aea4cd1d599f/lib/optimize/ModuleConcatenationPlugin.js#L439-L442
lib/stats/DefaultStatsFactoryPlugin.jscompilation.builtModulesis one of the indicators used to determine if a given module was served from the cache, the other beingcompilation.codeGeneratedModules.https://github.com/webpack/webpack/blob/34e2561addb0f65a7a6fb0ce7ae1aea4cd1d599f/lib/stats/DefaultStatsFactoryPlugin.js#L1097-L1116
compiler.cache.hooks.getExamples