feat: adds transparent PnP support to Webpack - #4953
Merged
Conversation
arcanis
commented
Dec 12, 2019
| accepts "~1.3.7" | ||
| escape-html "~1.0.3" | ||
|
|
||
| es-abstract@^1.12.0, es-abstract@^1.4.3, es-abstract@^1.5.1, es-abstract@^1.7.0: |
Contributor
Author
There was a problem hiding this comment.
Those changes aren't needed by my diff, they just got there when running yarn add 🤔
arcanis
commented
Dec 13, 2019
| webpackConfig.resolve | ||
| // This plugin can be removed once we switch to Webpack 6 | ||
| .plugin('pnp') | ||
| .use({ ...require('pnp-webpack-plugin') }) |
Contributor
Author
There was a problem hiding this comment.
The spread is a small trick required for webpack-chain (it mutates the plugin instance, but since the PnP plugin is supposed to be the same instance for every config it crashes when webpack-chain tries to override its previous registration).
pksunkara
approved these changes
Jan 6, 2020
Contributor
|
Looks good to me. But I would wait for @sodatea to merge it. |
Contributor
|
@arcanis Can you rebase this? I would like vue-cli to support the pnp feature. It's really good feature 😄 |
Contributor
Author
|
@pksunkara done! Let me know when it gets released and I'll setup our E2E tests accordingly to confirm everything is good 🙂 |
Contributor
|
I tested this locally. |
mactanxin
pushed a commit
to mactanxin/vue-cli
that referenced
this pull request
Feb 11, 2020
* feat: adds transparent PnP support to Webpack * fix: add the plugin name * fix: now pass tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
Other information:
Followup to #2850 - I've fixed the remaining issues on our side, only remains one thing! 🎉
Webpack currently requires using the PnP Webpack plugin in order to properly resolve dependencies (it will be optional starting from Webpack 6). It doesn't have any effect for people that aren't using PnP, so no risks at all 🙂