Skip to content

Commit

Permalink
fix(build): remove devtools in cjs production
Browse files Browse the repository at this point in the history
Fix #1524
  • Loading branch information
posva committed Aug 18, 2022
1 parent b1cd7eb commit 5b8983d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/router/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
}

Expand Down

0 comments on commit 5b8983d

Please sign in to comment.