fix(play): vite exclude dts deps (#7089)

This commit is contained in:
weidehai 2022-04-11 00:29:07 +08:00 committed by GitHub
parent 1796a63caa
commit 05d0eb8243
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,8 +31,8 @@ const esbuildPlugin = () => ({
export default defineConfig(async ({ mode }) => {
const env = loadEnv(mode, process.cwd(), '')
const { dependencies } = getPackageDependencies(epPackage)
let { dependencies } = getPackageDependencies(epPackage)
dependencies = dependencies.filter((dep) => !dep.startsWith('@types/')) // exclude dts deps
const optimizeDeps = (
await glob(['dayjs/(locale|plugin)/*.js'], {
cwd: path.resolve(projRoot, 'node_modules'),