From 089473af97077b8e14b3feff48d32d2733ad792c Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Wed, 21 Jul 2021 09:16:33 +0800 Subject: [PATCH] fix: mark @vue/compiler-sfc as an optional peer dependency Fixes https://github.com/vuejs/vue-cli/issues/6595 Fixes https://github.com/vuejs/vue-cli/issues/6596 It's not optional actually. However, in Vue CLI projects for Vue 2, vue-loader v16 is installed but not used. In that case, the missing peer dependency error should not be thrown. There's a dependency check in the entry file anyway. --- package.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package.json b/package.json index 0048dd5d0..a16683eb1 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,11 @@ "@vue/compiler-sfc": "^3.0.8", "webpack": "^4.1.0 || ^5.0.0-0" }, + "peerDependenciesMeta": { + "@vue/compiler-sfc": { + "optional": true + } + }, "devDependencies": { "@babel/core": "^7.7.7", "@babel/preset-env": "^7.11.5",