37 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| /**
 | |
|  * @file
 | |
|  * Functions to support theming in the caravane theme.
 | |
|  */
 | |
| 
 | |
| function caravane_page_attachments_alter(&$page) {
 | |
|   if (getenv('APP_ENV') === 'development') {
 | |
|     // $attachments['#attached']['html_head'][] = [['src' => 'http://localhost:5173/@vite/client', 'type' => 'module'],'vite-client'];
 | |
|     // $page['#attached']['library'][] = 'http://localhost:5173/@vite/client';
 | |
|     // $attachments['#attached']['html_head'][] = [['src' => 'http://localhost:5173/assets/js/main.js', 'type' => 'module'],'vite-main'];
 | |
|     // $page['#attached']['library'][] = 'http://localhost:5173/assets/js/main.js';
 | |
|     $page['#attached']['library'][] = 'caravane/vitehmr';
 | |
|   }
 | |
| }
 | |
| /**
 | |
|  * Implements hook_preprocess_HOOK() for html.html.twig.
 | |
|  */
 | |
| function caravane_preprocess_html(&$variables) {
 | |
|   
 | |
| }
 | |
| 
 | |
| /**
 | |
|  * Implements hook_preprocess_HOOK() for page.html.twig.
 | |
|  */
 | |
| function caravane_preprocess_page(&$variables) {
 | |
| 
 | |
| }
 | |
| 
 | |
| /**
 | |
|  * Implements hook_preprocess_HOOK() for node.html.twig.
 | |
|  */
 | |
| function caravane_preprocess_node(&$variables) {
 | |
| 
 | |
| }
 |