Skip to content

Commit 3fbb55a

Browse files
authored
feat: add warning to discourage Vite with yarn pnp (#21906)
1 parent a41404b commit 3fbb55a

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎packages/vite/src/node/config.ts‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1521,6 +1521,15 @@ export async function resolveConfig(
15211521
)
15221522
}
15231523

1524+
if (process.versions.pnp) {
1525+
logger.warnOnce(
1526+
colors.yellow(
1527+
`Using Yarn PnP with Vite is discouraged and PnP-specific bugs will no longer be actively worked on. ` +
1528+
`Please switch to a different ${colors.bold('nodeLinker')} mode or to a different package manager.`,
1529+
),
1530+
)
1531+
}
1532+
15241533
// resolve root
15251534
const resolvedRoot = normalizePath(
15261535
config.root ? path.resolve(config.root) : process.cwd(),

0 commit comments

Comments
 (0)