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
  • !2166

Support hoisting react-scripts and add require.resolve() to loaders

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/gaearon/fix-hoisting-packages into master May 15, 2017
  • Overview 3
  • Commits 2
  • Pipelines 0
  • Changes 2

Created by: gaearon

Our resolveLoader config is the only thing I found causing https://github.com/facebookincubator/create-react-app/issues/556 to fail. We probably already fixed the other issues.

I don't think we need it anyway because it was mostly necessary for npm 2 which we’re dropping.

As a followup I decided to add require.resolve() to all loaders and configs. We already do this in a bunch of places, and it seems to make sense given that the config is the one that knows their versions. Webpacks resolves them relatively to the source, but I don’t think this is what makes sense in most cases.

I hope this doesn’t break some obscure linking scenario. In fact I think it might fix some of the more obscure ones. But I’m not 100% sure.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/gaearon/fix-hoisting-packages