Make WordPress Core

Opened 2 months ago

Last modified 7 weeks ago

#61876 new defect (bug)

Exception thrown in navigation/view.min.js on mobile device

Reported by: derroth's profile derroth Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.6.1
Component: Menus Keywords: navigation mobile
Focuses: Cc:

Description

After the update to 6.6.1 the menu isn't shown anymore on mobile devices.
Remote debugger shows:

Uncaught SyntaxError: Cannot use import statement outside a module

Opening the file in the remote console the following line is marked as faulty:

// source --> https://toebele-rechberghausen.de/wp-includes/blocks/navigation/view.min.js?ver=6.6.1 
import*as e from "@wordpress/interactivity";

Change History (2)

#1 @galbaras
7 weeks ago

+1 - this problem manifests when the file is combined with other scripts, possibly in combination with deferring of render blocking code (using WP Fastest Cache in my case).

Could this be because import * as is minified into import*as?

#2 @galbaras
7 weeks ago

I've tested letting WP Fastest Cache do all the optimisations with the following:

<?php
define( 'CONCATENATE_SCRIPTS', false );
define( 'SCRIPT_DEBUG', true );

Same problem.

When I exclude view.min.js from being minified & combined, everything seems to work for me. @derroth Are you using page optimizaion or just plain WordPress?

Note: See TracTickets for help on using tickets.