()
| 6 | * importing runtime-core is side-effects free. |
| 7 | */ |
| 8 | export function initFeatureFlags(): void { |
| 9 | const needWarn = [] |
| 10 | |
| 11 | if (typeof __FEATURE_OPTIONS_API__ !== 'boolean') { |
| 12 | __DEV__ && needWarn.push(`__VUE_OPTIONS_API__`) |
| 13 | getGlobalThis().__VUE_OPTIONS_API__ = true |
| 14 | } |
| 15 | |
| 16 | if (typeof __FEATURE_PROD_DEVTOOLS__ !== 'boolean') { |
| 17 | __DEV__ && needWarn.push(`__VUE_PROD_DEVTOOLS__`) |
| 18 | getGlobalThis().__VUE_PROD_DEVTOOLS__ = false |
| 19 | } |
| 20 | |
| 21 | if (typeof __FEATURE_PROD_HYDRATION_MISMATCH_DETAILS__ !== 'boolean') { |
| 22 | __DEV__ && needWarn.push(`__VUE_PROD_HYDRATION_MISMATCH_DETAILS__`) |
| 23 | getGlobalThis().__VUE_PROD_HYDRATION_MISMATCH_DETAILS__ = false |
| 24 | } |
| 25 | |
| 26 | if (__DEV__ && needWarn.length) { |
| 27 | const multi = needWarn.length > 1 |
| 28 | console.warn( |
| 29 | `Feature flag${multi ? `s` : ``} ${needWarn.join(', ')} ${ |
| 30 | multi ? `are` : `is` |
| 31 | } not explicitly defined. You are running the esm-bundler build of Vue, ` + |
| 32 | `which expects these compile-time feature flags to be globally injected ` + |
| 33 | `via the bundler config in order to get better tree-shaking in the ` + |
| 34 | `production bundle.\n\n` + |
| 35 | `For more details, see https://link.vuejs.org/feature-flags.`, |
| 36 | ) |
| 37 | } |
| 38 | } |
no test coverage detected