File tree 1 file changed +11
-9
lines changed
1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -90,30 +90,32 @@ export { localeDetector }
90
90
debug ( 'nitro.replace' , nitroConfig . replace )
91
91
} )
92
92
93
+ // `defineI18nLocale` and `defineI18nConfig`
94
+ addServerImports ( [
95
+ ...[ NUXT_I18N_COMPOSABLE_DEFINE_LOCALE , NUXT_I18N_COMPOSABLE_DEFINE_CONFIG ] . map ( key => ( {
96
+ name : key ,
97
+ as : key ,
98
+ from : resolver . resolve ( 'runtime/composables/shared' )
99
+ } ) )
100
+ ] )
101
+
93
102
if ( enableServerIntegration ) {
94
- // `@intlify/utils/h3`, `defineI18nLocale` and `defineI18nConfig`
103
+ // `@intlify/utils/h3` and `defineLocaleDetector
95
104
const h3UtilsExports = await resolveModuleExportNames ( UTILS_H3_PKG , { url : import . meta. url } )
96
105
addServerImports ( [
97
106
...h3UtilsExports . map ( key => ( {
98
107
name : key ,
99
108
as : key ,
100
109
from : resolver . resolve ( nuxt . options . alias [ UTILS_H3_PKG ] )
101
110
} ) ) ,
102
- ...[ NUXT_I18N_COMPOSABLE_DEFINE_LOCALE , NUXT_I18N_COMPOSABLE_DEFINE_CONFIG ] . map ( key => ( {
103
- name : key ,
104
- as : key ,
105
- from : resolver . resolve ( 'runtime/composables/shared' )
106
- } ) ) ,
107
111
{
108
112
name : NUXT_I18N_COMPOSABLE_DEFINE_LOCALE_DETECTOR ,
109
113
as : NUXT_I18N_COMPOSABLE_DEFINE_LOCALE_DETECTOR ,
110
114
from : resolver . resolve ( 'runtime/composables/server' )
111
115
}
112
116
] )
113
- }
114
117
115
- // add nitro plugin
116
- if ( enableServerIntegration ) {
118
+ // add nitro plugin
117
119
addServerPlugin ( resolver . resolve ( 'runtime/server/plugin' ) )
118
120
}
119
121
}
You can’t perform that action at this time.
0 commit comments