Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforces require.resolve for loaders #4532

Open
wants to merge 7 commits into
base: dev
from

Conversation

@arcanis
Copy link
Contributor

commented Aug 31, 2019

What kind of change does this PR introduce? (check at least one)

  • Bugfix

Does this PR introduce a breaking change? (check one)

  • No

Other information:

This PR enforces require.resolve when adding new loaders to the Webpack configuration. Doing this is strongly advised, as otherwise Webpack itself will do the require calls and may return the wrong plugins depending on the hoisting.

I had to add a few missing dependencies (cache-loader and thread-loader) to two plugins, and a few optional peer dependencies (a feature available in Yarn and npm 6.11+) for optional integrations (such as less, sass, etc).

Ref yarnpkg/berry#368

arcanis added 4 commits Aug 31, 2019
@arcanis arcanis referenced this pull request Aug 31, 2019
arcanis added 3 commits Sep 2, 2019

@arcanis arcanis force-pushed the arcanis:mael/loader-deps branch from 221b258 to abc98bc Sep 2, 2019

@sodatea sodatea added the PR: Bug Fix label Sep 2, 2019

@sodatea

This comment has been minimized.

Copy link
Member

commented Sep 3, 2019

For the record, I'll review this PR later after the server-side issue of the npm registry resolves (npm/cli#224 (comment)).
Until then, all of our users who use npm would still get the peer dependency warnings and there's no way to eliminate them. It would certainly confuse them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.