vue-i18n
vue-i18n copied to clipboard
Can config add new env for disable performance measure in dev mode?
Clear and concise description of the problem
hi @kazupon san, i found in dev mode, my app has more memory by PerformanceMeasure
type.
performance invoked frequently by this code: https://github.com/intlify/vue-i18n-next/blob/v9.2.0-beta.21/packages/shared/src/utils.ts#L15
unless __DEV__
false in my dev mode , i have a stable memory usage.
Suggested solution
so, can i18n add a new env like __VUE_I18N_DISABLE_PERF__
, we can close this feature in dev?
Alternative
No response
Additional context
No response
Validations
- [X] Read the Contributing Guidelines
- [X] Read the Documentation
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Also hit by this performance issue on Firefox. I just found a solution. You need to force to use the production version of vue-i18n.
import { createI18n } from "vue-i18n";
Change to:
import { createI18n } from "vue-i18n/dist/vue-i18n.esm-browser.prod.js";
If you are not using esm, check under vue-i18n\dist
, you could try other prod.js
files.
__DEV__
is for development feature flag
This falg purpose is for debugging in development.