From 3d80b15ca4317203bcb2ecaa3d58bbfc303d67c4 Mon Sep 17 00:00:00 2001 From: Evan You Date: Fri, 21 Jan 2022 16:12:25 +0800 Subject: [PATCH] build: fix build script --- rollup.config.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rollup.config.js b/rollup.config.js index 5f7b1d51..6e909274 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -151,8 +151,11 @@ function createConfig(format, output, plugins = []) { // requires a ton of template engines which should be ignored. let cjsIgnores = [] if (pkg.name === '@vue/compiler-sfc') { + const consolidatePath = require.resolve('@vue/consolidate/package.json', { + paths: [packageDir] + }) cjsIgnores = [ - ...Object.keys(require('@vue/consolidate/package.json').devDependencies), + ...Object.keys(require(consolidatePath).devDependencies), 'vm', 'crypto', 'react-dom/server',