We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
.npmrc
1 parent 5d2c8da commit 953a080Copy full SHA for 953a080
packages/@vue/cli/lib/Creator.js
@@ -34,6 +34,7 @@ const {
34
hasProjectGit,
35
hasYarn,
36
hasPnpm3OrLater,
37
+ hasPnpmVersionOrLater,
38
logWithSpinner,
39
stopSpinner,
40
exit,
@@ -223,8 +224,12 @@ module.exports = class Creator extends EventEmitter {
223
224
225
// generate a .npmrc file for pnpm, to persist the `shamefully-flatten` flag
226
if (packageManager === 'pnpm') {
227
+ const pnpmConfig = hasPnpmVersionOrLater('4.0.0')
228
+ ? 'shamefully-hoist=true\n'
229
+ : 'shamefully-flatten=true\n'
230
+
231
await writeFileTree(context, {
- '.npmrc': 'shamefully-flatten=true\n'
232
+ '.npmrc': pnpmConfig
233
})
234
}
235
0 commit comments