outeredge / magento-structured-data-module

Magento Structured Data Module by outer/edge
MIT License
52 stars 14 forks source link

Issue when 'Move JS code to the bottom of the page' enabled #63

Closed chrisastley closed 4 months ago

chrisastley commented 8 months ago

Hi,

I have the module enabled on the website and it is working great. The issue is that I have been optimising the site for the client and found that 'Move JS code to the bottom of the page' was not enabled.

After enabling the site was through lots of require errors in the console and all javascript frontend broke. After doing a process of elimination to find which module was causing the issue I found that if I disable your module the error goes away.

I've looked at the code and can't see what would be causing it. I have even temporarily removed the frontend layout folder and recompiled but the issue still exists.

Is this something you have ever come across before?

Thanks in advance. Chris

davidwindell commented 8 months ago

Hey @chrisastley

We use defer JS on lots of sites alongside this module, can you elaborate on the errors you experienced?