We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The mini-css-extract-plugin should be cached well when webpack is hot built。
mini-css-extract-plugin
Cause Error Could not freeze xxx/xx.scss Cannot read property 'hash' of undefined 。
Could not freeze xxx/xx.scss Cannot read property 'hash' of undefined
The event _hardSourceFreezeModule is not compatible when webpack is hot built scss( use mini-css-extract-plugin)。
_hardSourceFreezeModule
scss
With code:
if (module.request && (cacheable(module) || !module.built) && module instanceof NormalModule && (!frozen || (schema >= 4 && module.hash !== frozen.build.hash) || (schema < 4 && module.getHashDigest(extra.compilation.dependencyTemplates) !== frozen.hash)) )
And segment:
module.hash !== frozen.build.hash
The scss module hash was changed ,but the module maybe not be built (module.built===false)。
hash
module.built===false
let serialModule = serialNormalModule; if (!module.built) { serialModule = serialNormalModule4PreBuild; }
And only try this code
let serialModule = serialNormalModule; if (!module.built) { if (module.hash) { return null; } serialModule = serialNormalModule4PreBuild; }
It's could work。
But this maybe not a foundmental problem, just a possibility。
The text was updated successfully, but these errors were encountered:
👍 happens to me as well
Sorry, something went wrong.
No branches or pull requests
Expected Behavior
Actual Behavior
Maybe Question
The event
_hardSourceFreezeModule
is not compatible when webpack is hot builtscss
( usemini-css-extract-plugin
)。With code:
And segment:
module.hash !== frozen.build.hash
Scenes
The
scss
modulehash
was changed ,but the module maybe not be built (module.built===false
)。And only try this code
It's could work。
But this maybe not a foundmental problem, just a possibility。
The text was updated successfully, but these errors were encountered: