From: Eduardo San Martin Morote Date: Thu, 18 Aug 2022 07:47:20 +0000 (+0200) Subject: fix(build): remove devtools in cjs production X-Git-Tag: v4.1.4~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5b8983d04592c1420837c4533ee3b6cf6a07a314;p=thirdparty%2Fvuejs%2Frouter.git fix(build): remove devtools in cjs production Fix #1524 --- diff --git a/packages/router/rollup.config.js b/packages/router/rollup.config.js index d79038a6..283c4c99 100644 --- a/packages/router/rollup.config.js +++ b/packages/router/rollup.config.js @@ -106,7 +106,11 @@ function createConfig(buildName, output, plugins = []) { hasTSChecked = true const external = ['vue'] - if (!isGlobalBuild) { + if ( + !isGlobalBuild && + // vue-router.prod.cjs should not require `@vue/devtools-api` (like Vue) + !(isProductionBuild && isNodeBuild) + ) { external.push('@vue/devtools-api') }