vigetlabs / wordpress-site-starter

2 stars 0 forks source link

Fix css/js errors in console #141

Open nathan-schmidt-viget opened 3 months ago

nathan-schmidt-viget commented 3 months ago

Console log error

With the new version of WP there is now a script with type="importmap" and our script has type="module" and type module can not come before any importmap types. This can be fixed in the class-vite.php by setting 100 for wp_head.

add_action( 'wp_head', [ $this, 'init' ], 100 );

Vite twise

We are also calling Vite() twice which is loading everything twice.

Classes missing in preview

Remove is_preview() from acf-blocks-toolkit/includes/helpers.php