Created by: GoodForOneFare
webpack now uses Sets to track:
Set#some
does not exist, so this fix just converts webpack's data to an array.
Set#push
does not exist, so watch logic now uses add
if it's available
To verify
Check out this example repo that runs a webpack@4 build with WatchMissingNodeModules
as a plugin.
Before | After |
---|---|
react-dev-utils@next
fails with a confusing error
Verify that git clone git@github.com:GoodForOneFare/watch-missing-modules-webpack4-example.git
cd watch-missing-modules-webpack4-example
git checkout master
yarn install
yarn run build # This will output errors about missingDeps.some not being a function
Verify that this fork gives useful feedback + watch behaviour
git clone git@github.com:GoodForOneFare/watch-missing-modules-webpack4-example.git
cd watch-missing-modules-webpack4-example
git checkout fixed
yarn install
yarn run build --watch # This will allow the plugin to report a missing dependency (the build still fails, though!)
# To verify that contextDependencies watching still works, use this:
# `touch node_modules/missing`
# Once that folder exists, the build should pass.