Defer javascript for protheme

I am using flying press to defer the js I understand that I need to exclude pro theme files so I am excluding any files that are on the path /wp-content/themes/pro/cornerstone/assets/js/app/ but I am getting a Uncaught TypeError: Cannot read properties of undefined (reading ‘CodeMirror’) I am finding it hard to find the correct files that I need to exclude relating to CodeMirror

Do you have suggestions for files that cornerstone is dependant on ?

Hello @wicara,

Thanks for writing in!

You can try both of these directories:

Kindly let us know how it goes.

Also is there any pages that need to not be cached eg cornerstone ?

Hi @wicara,

No, there is no such page that needs to be cached for Cornerstone.


sorry needs not be cached. I had to remove the path /cornerstone/ from the caching part to allow cornerstone to load with the optimisation plugin active.

Hey @wicara,

That’s the correct way, you just need to exclude everything from our theme from any minifications. Don’t worry our files are fully optimize.

Thank you.