Every other production build results in unusable output
Expected Behavior
Every executable from a production build should be usable (In my use case, Electron)
Actual Behavior
Every other production results in an executable which throws: [error] ReferenceError: undefinedresult is not defined
Clearing cache before build results in a guaranteed working executable.
Steps to Reproduce
Unknown - This was not affecting me at all for months, but suddenly this is an issue for me on both Linux and Windows 7. No configuration changes were made to Webpack or babel, but I did start using Yarn workspaces with Lerna.
Operating System, Node, and NPM dependency versions
Linux Mint 19
Windows 7 x64
Node 10.9.0
"devDependencies": {
"babel-core": "^7",
"babel-loader": "^8.0.0-beta.4",
"babel-preset-env": "^7.0.0,
"css-loader": "^1.0.0",
"html-webpack-plugin": "^3.2.0",
"mini-css-extract-plugin": "N/A", (Is this required for proper operation?)
"style-loader": "^0.22.1",
"webpack": "^4.17.1",
"webpack-cli": "^3.1.0"
},
"dependencies": {
"lodash": "^4.17.11"
}
Failing builds may be 18kb smaller. Not completely sure about that.
downgrade to webpack 4.19.0 see #443
Thanks @dreyks. Is 4.19.1 broken? That's the actual version I have installed.
webpack is not broken. hardsource is broken when working with webpack 4.19.1 and up
Thanks very much @dreyks. I'll give 4.19.0 a shot.
Are there any plans to update this excellent plugin to work with newer versions of Webpack @mzgoddard ?
More than a year has passed... Any progress on this, or is this project dead?
Seems dead. You can still use the plugin in only development to speed things up. Not as good as having it for builds also, but close.
For those finding this in the future (like me)
I'm pretty sure this was fixed in v0.13.0. (Fixed: https://github.com/mzgoddard/hard-source-webpack-plugin/pull/444 Merged: https://github.com/mzgoddard/hard-source-webpack-plugin/pull/477)
@ajaska Thanks for the hint 😄 v0.13.0 fixed this error for me