File tree Expand file tree Collapse file tree 3 files changed +23
-4
lines changed Expand file tree Collapse file tree 3 files changed +23
-4
lines changed Original file line number Diff line number Diff line change 7474 // 'css/app.css' => '',
7575 ],
7676
77+ // CSS files that are loaded in all pages, using Laravel's @vite() helper
78+ // Please note that support for Vite was added in Laravel 9.19. Earlier versions are not able to use this feature.
79+ 'vite_styles ' => [ // resource file_path
80+ // 'resources/css/app.css' => '',
81+ ],
82+
7783 // ------
7884 // HEADER
7985 // ------
146152 ],
147153
148154 // JS files that are loaded in all pages, using Laravel's mix() helper
149- 'mix_scripts ' => [// file_path => manifest_directory_path
155+ 'mix_scripts ' => [ // file_path => manifest_directory_path
150156 // 'js/app.js' => '',
151157 ],
152158
159+ // JS files that are loaded in all pages, using Laravel's @vite() helper
160+ 'vite_scripts ' => [ // resource file_path
161+ // 'resources/js/app.js',
162+ ],
163+
153164 // -------------
154165 // CACHE-BUSTING
155166 // -------------
Original file line number Diff line number Diff line change 88
99 @yield (' before_styles' )
1010 @stack (' before_styles' )
11-
11+
1212 @if (config (' backpack.base.styles' ) && count (config (' backpack.base.styles' )) )
1313 @foreach (config (' backpack.base.styles' ) as $path )
1414 <link rel =" stylesheet" type =" text/css" href =" {{ asset ($path ). ' ?v=' . config (' backpack.base.cachebusting_string' ) } }" >
2121 @endforeach
2222 @endif
2323
24+ @if (config (' backpack.base.vite_styles' ) && count (config (' backpack.base.vite_styles' )) )
25+ @vite (config (' backpack.base.vite_styles' ) )
26+ @endif
27+
2428 @yield (' after_styles' )
2529 @stack (' after_styles' )
2630
2933 <!-- [if lt IE 9]>
3034 <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
3135 <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
32- <![endif]-->
36+ <![endif]-->
Original file line number Diff line number Diff line change 1010 @endforeach
1111@endif
1212
13+ @if (config (' backpack.base.vite_scripts' ) && count (config (' backpack.base.vite_scripts' )) )
14+ @vite (config (' backpack.base.vite_scripts' ) )
15+ @endif
16+
1317@include (' backpack::inc.alerts' )
1418
1519{{-- page script --}}
6670
6771@if (config (' app.debug' ) )
6872 @include (' crud::inc.ajax_error_frame' )
69- @endif
73+ @endif
You can’t perform that action at this time.
0 commit comments