From b44c9a070528c06c7d070f7f40f27d555da3111a Mon Sep 17 00:00:00 2001 From: CokeMine Date: Tue, 1 Jun 2021 12:43:30 +0800 Subject: [PATCH 1/6] fix: fix __VUE_PROD_DEVTOOLS__ defined in cjs --- rollup.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rollup.config.js b/rollup.config.js index 1ff829389..31035942c 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -61,7 +61,7 @@ function createEntry(config) { __DEV__: isBundlerBuild ? `(process.env.NODE_ENV !== 'production')` : config.env !== 'production', - __VUE_PROD_DEVTOOLS__: isBundlerBuild ? '__VUE_PROD_DEVTOOLS__' : 'false' + __VUE_PROD_DEVTOOLS__: isBundlerBuild ? 'false' : '__VUE_PROD_DEVTOOLS__' })) if (config.transpile !== false) { From f78041e41012fd5a1939c00bd8720e9c2709a989 Mon Sep 17 00:00:00 2001 From: Kia King Ishii Date: Tue, 1 Jun 2021 22:09:39 +0900 Subject: [PATCH 2/6] fix: do remove devtool const from cjs build --- rollup.config.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rollup.config.js b/rollup.config.js index 31035942c..7a41ec130 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -27,6 +27,7 @@ function createEntries() { function createEntry(config) { const isGlobalBuild = config.format === 'iife' const isBundlerBuild = config.format !== 'iife' && !config.browser + const isBundlerESMBuild = /esm-bundler/.test(format) const c = { external: ['vue'], @@ -61,7 +62,9 @@ function createEntry(config) { __DEV__: isBundlerBuild ? `(process.env.NODE_ENV !== 'production')` : config.env !== 'production', - __VUE_PROD_DEVTOOLS__: isBundlerBuild ? 'false' : '__VUE_PROD_DEVTOOLS__' + __VUE_PROD_DEVTOOLS__: isBundlerESMBuild + ? '__VUE_PROD_DEVTOOLS__' + : 'false' })) if (config.transpile !== false) { From b4d7511d89779052e46de432af02be16d2a81f72 Mon Sep 17 00:00:00 2001 From: Kia King Ishii Date: Tue, 1 Jun 2021 23:16:48 +0900 Subject: [PATCH 3/6] fix: typo --- rollup.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rollup.config.js b/rollup.config.js index 7a41ec130..5727d52f1 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -27,7 +27,7 @@ function createEntries() { function createEntry(config) { const isGlobalBuild = config.format === 'iife' const isBundlerBuild = config.format !== 'iife' && !config.browser - const isBundlerESMBuild = /esm-bundler/.test(format) + const isBundlerESMBuild = /esm-bundler/.test(config.format) const c = { external: ['vue'], From a0d87213ed30ef6f60df8f5ccbca873d3daa44a5 Mon Sep 17 00:00:00 2001 From: Kia King Ishii Date: Tue, 1 Jun 2021 23:27:32 +0900 Subject: [PATCH 4/6] fix: finally --- rollup.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rollup.config.js b/rollup.config.js index 5727d52f1..ca5c57b0e 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -27,7 +27,7 @@ function createEntries() { function createEntry(config) { const isGlobalBuild = config.format === 'iife' const isBundlerBuild = config.format !== 'iife' && !config.browser - const isBundlerESMBuild = /esm-bundler/.test(config.format) + const isBundlerESMBuild = /esm-bundler/.test(config.file) const c = { external: ['vue'], From 447c54edfc944fb3bf96e83c4778e04d4cf52aec Mon Sep 17 00:00:00 2001 From: CokeMine Date: Tue, 1 Jun 2021 22:38:09 +0800 Subject: [PATCH 5/6] fix: typo --- rollup.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rollup.config.js b/rollup.config.js index ca5c57b0e..46bc146c1 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -27,7 +27,7 @@ function createEntries() { function createEntry(config) { const isGlobalBuild = config.format === 'iife' const isBundlerBuild = config.format !== 'iife' && !config.browser - const isBundlerESMBuild = /esm-bundler/.test(config.file) + const isBundlerESMBuild = config.format === 'es' const c = { external: ['vue'], From 177ceeca9be62406b729b5d9015a8f50524084e7 Mon Sep 17 00:00:00 2001 From: Kia King Ishii Date: Wed, 2 Jun 2021 00:16:41 +0900 Subject: [PATCH 6/6] fix: do not include browser build --- rollup.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rollup.config.js b/rollup.config.js index 46bc146c1..30b9df0bb 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -27,7 +27,7 @@ function createEntries() { function createEntry(config) { const isGlobalBuild = config.format === 'iife' const isBundlerBuild = config.format !== 'iife' && !config.browser - const isBundlerESMBuild = config.format === 'es' + const isBundlerESMBuild = config.format === 'es' && !config.browser const c = { external: ['vue'],