From 3b4d45e076c90de7ab51067ab228fce3cfc05f2b Mon Sep 17 00:00:00 2001 From: Lee Date: Sat, 29 May 2021 19:16:20 +0800 Subject: [PATCH] remove __FEATURE_ESM_BUNDLER_WARN__ flag. (#514) --- jest.config.js | 3 +-- packages/global.d.ts | 1 - packages/vue-i18n/README.md | 4 ---- packages/vue-i18n/src/misc.ts | 4 ---- rollup.config.js | 1 - 5 files changed, 1 insertion(+), 12 deletions(-) diff --git a/jest.config.js b/jest.config.js index c1e068839..1a037b545 100644 --- a/jest.config.js +++ b/jest.config.js @@ -72,8 +72,7 @@ module.exports = { __ESM_BROWSER__: false, __NODE_JS__: true, __FEATURE_FULL_INSTALL__: true, - __FEATURE_LEGACY_API__: true, - __FEATURE_ESM_BUNDLER_WARN__: true + __FEATURE_LEGACY_API__: true }, // The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers. diff --git a/packages/global.d.ts b/packages/global.d.ts index 5d695d751..e54bd9f1c 100644 --- a/packages/global.d.ts +++ b/packages/global.d.ts @@ -15,7 +15,6 @@ declare let __FEATURE_PROD_VUE_DEVTOOLS__: boolean declare let __FEATURE_PROD_INTLIFY_DEVTOOLS__: boolean declare let __FEATURE_LEGACY_API__: boolean declare let __FEATURE_FULL_INSTALL__: boolean -declare let __FEATURE_ESM_BUNDLER_WARN__: boolean // for tests declare namespace jest { diff --git a/packages/vue-i18n/README.md b/packages/vue-i18n/README.md index d28b035a9..8c811dc68 100644 --- a/packages/vue-i18n/README.md +++ b/packages/vue-i18n/README.md @@ -65,10 +65,6 @@ The build will work without configuring these flags, however it is **strongly re Note: the replacement value **must be boolean literals** and cannot be strings, otherwise the bundler/minifier will not be able to properly evaluate the conditions. -## Other Feature Flags - -- `__FEATURE_ESM_BUNDLER_WARN__` (Suppress / Not suppress feature flags recommended warnings in build for `esm-bulder`) - ## :copyright: License [MIT](http://opensource.org/licenses/MIT) diff --git a/packages/vue-i18n/src/misc.ts b/packages/vue-i18n/src/misc.ts index 65f9e6778..dda9b789b 100644 --- a/packages/vue-i18n/src/misc.ts +++ b/packages/vue-i18n/src/misc.ts @@ -36,10 +36,6 @@ export function initFeatureFlags(): void { getGlobalThis().__INTLIFY_PROD_DEVTOOLS__ = false } - if (__DEV__ && typeof __FEATURE_ESM_BUNDLER_WARN__ === 'boolean') { - needWarn = __FEATURE_ESM_BUNDLER_WARN__ - } - if (__DEV__ && needWarn) { console.warn( `You are running the esm-bundler build of vue-i18n. It is recommended to ` + diff --git a/rollup.config.js b/rollup.config.js index a395881ca..96b6b951c 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -235,7 +235,6 @@ function createReplacePlugin( __FEATURE_PROD_INTLIFY_DEVTOOLS__: isBundlerESMBuild ? `__INTLIFY_PROD_DEVTOOLS__` : false, - __FEATURE_ESM_BUNDLER_WARN__: true, preventAssignment: false, ...(isProduction && isBrowserBuild ? {