@@ -95,13 +95,21 @@ export default defineNuxtModule<ModuleOptions>({
9595 addPluginTemplate ( {
9696 mode : 'client' ,
9797 filename : 'quasar-plugin.mjs' ,
98- getContents : ( ) => vuePluginTemplate ( options , false )
98+ getContents : ( ) => vuePluginTemplate ( {
99+ imports,
100+ options,
101+ mode : 'client' ,
102+ } )
99103 } )
100104 if ( nuxt . options . ssr ) {
101105 addPluginTemplate ( {
102106 mode : 'server' ,
103107 filename : 'quasar-plugin.server.mjs' ,
104- getContents : ( ) => vuePluginTemplate ( options , true )
108+ getContents : ( ) => vuePluginTemplate ( {
109+ imports,
110+ options,
111+ mode : 'server' ,
112+ } )
105113 } )
106114 }
107115
@@ -171,6 +179,23 @@ export default defineNuxtModule<ModuleOptions>({
171179 }
172180 } )
173181
182+ nuxt . hook ( 'nitro:config' , async ( config ) => {
183+ config . replace = {
184+ ...config . replace ,
185+ __QUASAR_VERSION__ : `'${ quasarVersion } '` ,
186+ __QUASAR_SSR__ : nuxt . options . ssr ,
187+ __QUASAR_SSR_SERVER__ : true ,
188+ __QUASAR_SSR_CLIENT__ : false ,
189+ __QUASAR_SSR_PWA__ : false
190+ }
191+ config . externals ??= { }
192+ config . externals . inline ??= [ ]
193+ config . externals . inline . push (
194+ await resolvePath ( 'quasar/lang/en-US' ) ,
195+ await resolvePath ( 'quasar/icon-set/material-icons' )
196+ )
197+ } )
198+
174199 // WARN: Webpack support incomplete
175200 nuxt . hook ( 'webpack:config' , ( configs ) => {
176201 configs . forEach ( config => {
0 commit comments