From ead8a9a8bcdaf53d09393bf91c8a113cff064adc Mon Sep 17 00:00:00 2001 From: pooya parsa Date: Wed, 17 Aug 2022 16:06:51 +0200 Subject: [PATCH] build(pinia): remove unused `@vue/devtools-api` require from `pinia.prod.cjs` (#1561) [skip ci] Co-authored-by: Eduardo San Martin Morote --- rollup.config.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rollup.config.js b/rollup.config.js index c8ecfe0c..cc227673 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -119,7 +119,11 @@ function createConfig(buildName, output, plugins = []) { hasTSChecked = true const external = ['vue-demi', 'vue', '@vue/composition-api'] - if (!isGlobalBuild) { + if ( + !isGlobalBuild && + // pinia.prod.cjs should not require `@vue/devtools-api` (like Vue) + !(isProductionBuild && isNodeBuild) + ) { external.push('@vue/devtools-api') } @@ -191,6 +195,7 @@ function createReplacePlugin( replacements[key] = process.env[key] } }) + return replace({ preventAssignment: true, values: replacements, -- 2.47.2