From 89f36cd5ffa3899da11a6abe22cb5cae9ce9a401 Mon Sep 17 00:00:00 2001 From: kazuya kawaguchi Date: Sat, 12 Jun 2021 23:39:36 +0900 Subject: [PATCH] fix: __INTLIFY_PROD_DEVTOOLS__ is not defined (#532) closes #529 --- packages/core-base/src/index.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/core-base/src/index.ts b/packages/core-base/src/index.ts index eb59ab78c..eee1bb3c5 100644 --- a/packages/core-base/src/index.ts +++ b/packages/core-base/src/index.ts @@ -1,3 +1,5 @@ +import { getGlobalThis } from '@intlify/shared' + export * from '@intlify/message-resolver' export * from '@intlify/runtime' export { @@ -14,3 +16,9 @@ export { getWarnMessage, CoreWarnCodes } from './warnings' export { CoreError, CoreErrorCodes, createCoreError } from './errors' export * from './types' export * from './devtools' + +if (__ESM_BUNDLER__ && !__TEST__) { + if (typeof __FEATURE_PROD_INTLIFY_DEVTOOLS__ !== 'boolean') { + getGlobalThis().__INTLIFY_PROD_DEVTOOLS__ = false + } +}