File tree 1 file changed +13
-1
lines changed
1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 1
1
import vFont from '#speedkit/directives/vFont' ;
2
+ import { isSupportedBrowser } from '#speedkit/utils/browser' ;
3
+ import LoadingSpinner from '#speedkit/components/SpeedkitImage/classes/LoadingSpinner' ;
2
4
3
5
export default defineNuxtPlugin ( {
4
6
name : 'speedkit-plugin' ,
@@ -15,7 +17,17 @@ export default defineNuxtPlugin({
15
17
module => module . default || module
16
18
) ;
17
19
18
- nuxtApp . provide ( 'speedkit' , { getFont : fontList . getFont . bind ( fontList ) } ) ;
20
+ nuxtApp . provide ( 'speedkit' , {
21
+ getFont : fontList . getFont . bind ( fontList ) ,
22
+ crossorigin : < %= JSON . stringify ( options . crossorigin ) % > ,
23
+ isBrowserSupported : ( ) => isSupportedBrowser ( < %= options . supportedBrowserDetector % > ),
24
+ loader: () => < % if ( options . loader . dataUri ) { % > new LoadingSpinner({
25
+ dataUri : loaderDataUri ,
26
+ size : '<%= options.loader.size %>' ,
27
+ backgroundColor : '<%= options.loader.backgroundColor %>'
28
+ } )< % } else { % > undefined < % } %> ,
29
+ targetFormats : < %= JSON . stringify ( options . targetFormats ) % >
30
+ } ) ;
19
31
20
32
useHead ( {
21
33
style : [
You can’t perform that action at this time.
0 commit comments