Parcourir la source

build: fix build script

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

+ 4 - 1
rollup.config.js

@@ -151,8 +151,11 @@ function createConfig(format, output, plugins = []) {
   // requires a ton of template engines which should be ignored.
   // requires a ton of template engines which should be ignored.
   let cjsIgnores = []
   let cjsIgnores = []
   if (pkg.name === '@vue/compiler-sfc') {
   if (pkg.name === '@vue/compiler-sfc') {
+    const consolidatePath = require.resolve('@vue/consolidate/package.json', {
+      paths: [packageDir]
+    })
     cjsIgnores = [
     cjsIgnores = [
-      ...Object.keys(require('@vue/consolidate/package.json').devDependencies),
+      ...Object.keys(require(consolidatePath).devDependencies),
       'vm',
       'vm',
       'crypto',
       'crypto',
       'react-dom/server',
       'react-dom/server',