]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
fix(build): remove devtools in cjs production
authorEduardo San Martin Morote <posva13@gmail.com>
Thu, 18 Aug 2022 07:47:20 +0000 (09:47 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Thu, 18 Aug 2022 07:47:20 +0000 (09:47 +0200)
Fix #1524

packages/router/rollup.config.js

index d79038a65bc14c99b275b772a3eeca2be199251e..283c4c998eb96126d8283d6392f41d3e8e6a5bf7 100644 (file)
@@ -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')
   }