Parcourir la source

fix(build): fix cjs re-exports check for compat build

Evan You il y a 3 ans
Parent
commit
ce064a172b
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      rollup.config.mjs

+ 1 - 1
rollup.config.mjs

@@ -368,7 +368,7 @@ function cjsReExportsPatchPlugin() {
         return code.replace(matcher, (_, r1, r2, r3) => {
         return code.replace(matcher, (_, r1, r2, r3) => {
           return `Object.keys(${r1}).forEach(function(k) {${r2}${r3}});`
           return `Object.keys(${r1}).forEach(function(k) {${r2}${r3}});`
         })
         })
-      } else if (options.file.endsWith('/vue.cjs.js')) {
+      } else if (options.file.endsWith('packages/vue/dist/vue.cjs.js')) {
         // make sure we don't accidentally miss the rewrite in case Rollup
         // make sure we don't accidentally miss the rewrite in case Rollup
         // changes the output again.
         // changes the output again.
         throw new Error('cjs build re-exports rewrite failed.')
         throw new Error('cjs build re-exports rewrite failed.')