feat(cli:babel-loader): cli2.x add pnpm support (#10548)

* feat(cli:babel-loader): cli2.x add pnpm support

#10483

* fix(cli:babel-loader): fix regular errors

after inspection,
/node_modules(\/\.pnpm)?\/(?!(@vant\/cli))/ cannot be used normally under pnpm,
so use /^node_modules(\/\.pnpm)?\/(?!(@vant\/cli))/
This commit is contained in:
张雨涵 2022-04-28 15:36:54 +08:00 committed by GitHub
parent b42e674042
commit 2744eaabf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -84,7 +84,7 @@ export const baseConfig: WebpackConfig = {
},
{
test: /\.(js|ts|jsx|tsx)$/,
exclude: /node_modules\/(?!(@vant\/cli))/,
exclude: /^node_modules(\/\.pnpm)?\/(?!(@vant\/cli))/,
use: [CACHE_LOADER, 'babel-loader'],
},
{