@@ -280,7 +280,7 @@ export function createI18n<
280280 } ,
281281 // install plugin
282282 async install ( app : App , ...options : unknown [ ] ) : Promise < void > {
283- if ( __DEV__ || __FEATURE_PROD_DEVTOOLS__ ) {
283+ if ( ( __DEV__ || __FEATURE_PROD_DEVTOOLS__ ) && ! __NODE_JS__ ) {
284284 app . __VUE_I18N__ = i18n as _I18n
285285 }
286286
@@ -313,7 +313,7 @@ export function createI18n<
313313 )
314314 }
315315
316- if ( __DEV__ ) {
316+ if ( ( __DEV__ || __FEATURE_PROD_DEVTOOLS__ ) && ! __NODE_JS__ ) {
317317 const ret = await enableDevTools ( app , i18n as _I18n )
318318 if ( ! ret ) {
319319 throw createI18nError ( I18nErrorCodes . CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN )
@@ -366,7 +366,7 @@ export function createI18n<
366366 }
367367 }
368368
369- if ( __DEV__ || __FEATURE_PROD_DEVTOOLS__ ) {
369+ if ( ( __DEV__ || __FEATURE_PROD_DEVTOOLS__ ) && ! __NODE_JS__ ) {
370370 devtoolsRegisterI18n ( i18n , VERSION )
371371 }
372372
@@ -582,7 +582,11 @@ function setupLifeCycle<Messages, DateTimeFormats, NumberFormats>(
582582
583583 onMounted ( ( ) => {
584584 // inject composer instance to DOM for intlify-devtools
585- if ( ( __DEV__ || __FEATURE_PROD_DEVTOOLS__ ) && target . vnode . el ) {
585+ if (
586+ ( __DEV__ || __FEATURE_PROD_DEVTOOLS__ ) &&
587+ ! __NODE_JS__ &&
588+ target . vnode . el
589+ ) {
586590 target . vnode . el . __INTLIFY__ = composer
587591 emitter = createEmitter < DevToolsEmitterEvents > ( )
588592 // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -596,6 +600,7 @@ function setupLifeCycle<Messages, DateTimeFormats, NumberFormats>(
596600 // remove composer instance from DOM for intlify-devtools
597601 if (
598602 ( __DEV__ || __FEATURE_PROD_DEVTOOLS__ ) &&
603+ ! __NODE_JS__ &&
599604 target . vnode . el &&
600605 target . vnode . el . __INTLIFY__
601606 ) {
0 commit comments