hard-source-webpack-plugin
hard-source-webpack-plugin copied to clipboard
The application runs incorrectly at the second packaging
import Rate from './antd-mobile/es/components/rate'
console.log(Rate)
Expected Behavior
application runs correctly,The console displays the Rate
Actual Behavior
run webpakc build, at the second time the console displays the Rate is undefined, otherwise, it works correctly
Is an error being thrown?
no
Steps to Reproduce
Here is a demo that reproduces the problem : https://github.com/duwenbin0316/hard-source-cache-error
Operating System, Node, and NPM dependency versions
Mac OS 13.1
Node 16.14.2
"dependencies": {
"antd-mobile": "^5.29.1",
"css-loader": "^2.1.1",
"hard-source-webpack-plugin": "^0.13.1",
"html-webpack-plugin": "^4.5.2",
"uglifyjs-webpack-plugin": "^2.2.0",
"webpack": "^4.46.0",
"webpack-cli": "^4.10.0"
}
I analyzed the characteristics of the project and it may be related to the sideEffects configuration. If I delete this configuration, this problem will not occur