Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Merge requests
  • !4216

WatchMissingNodeModulesPlugin now handles webpack@4 data

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/GoodForOneFare/watch-missing-webpack-4-modules into next Mar 26, 2018
  • Overview 3
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: GoodForOneFare

webpack now uses Sets to track:

  • missingDependencies
  • contextDependencies

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
watch-modules-broken watch-modules-fixed

Verify that react-dev-utils@next fails with a confusing error

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.
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/GoodForOneFare/watch-missing-webpack-4-modules