-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
fix: work around npm6/postcss8 hoisting issue #6358
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You really shouldn't run an install during an install
@@ -0,0 +1,8 @@ | |||
// this file will be renamed to hotfix.js if the package is installed by npm 6 | |||
module.exports = (api) => { | |||
api.extendPackage({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can check the package manager version here and avoid the postinstall
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The generator is controlled by @vue/cli
itself, so npm is not involved during the execution, therefore the package manager version is not available.
I don't feel like adding an ad hoc API just for this fix, so I chose to keep the postinstall script.
Oh I shouldn't have merged this one… I may better throw a runtime error for incorrect hoisting results. |
This reverts commit 27b4263.
Closes #6342
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
Other information: