Exclude Cornerstone from minification

Hey there,

I’m using a minification plugin but unfortunately it breaks the Pro builders, they simply won’t load when minification is turned on. According to the developer of the minification plugin there might be a function I could use exclude the builder pages from being minified or touched at all by the plugin.

Is there such a function available. Anyone else got minification to work in Cornerstone?

Hello There,

Thanks for writing in! Please be advised that all the JS and CSS in X/Pro and Cornerstone were already minified. This is why when you use a plugin to minify it again, it will result to an error. Please exclude all the theme and Cornerstone resources from being minified. In most of the minify plugin, you can supply to folder or filenames to exclude theme from being minified. Check your minify plugin settings and find the exclude option. You should be able to find it in the settings of the plugin.

Hope this helps.

Thanks, I’ve already excluded many cornerstone related files but I’m probably missing one or two. Do you have a list of all the files that must be excluded?

Hello There,

For the complete list of files, it is best that you browse the plugins folder and find the css and js folders so that you can compare it to your existing list of excluded files.

wp-content/plugins/cornerstone/assets/dist/css/
wp-content/plugins/cornerstone/assets/dist/js/

Hope this helps.

Thanks @RueNel,

A bunch of those files don’t even show up in the list. Is there a function I could use to see if the current page is Cornerstone so I can exclude it from minification that way?

HI there,

What plugin you’re using? Maybe I can try it first if it’s doable. Maybe what you need are rules, something that select all theme and cornerstone assets for exclusion, like with a few lines.

In Cloudflare, it’s simply by adding these rules

*example.com/x*
*example.com/*cornerstone*

Thanks!

It’s Hummingbird: https://premium.wpmudev.org/project/wp-hummingbird/

Hi there,

Ah, it’s a paid one, can’t check it at this moment. How about providing your site’s URL and login credentials? I just need to check its configuration but I can’t promise if it’s doable since this all setup depends on your plugin.

Thanks!

Sure, I’ve added login credentials in a secure note. Thanks for taking a look.

Hi there,

Thank you for providing the information. I did my best to find out the info to be able to stop the minifications, but it seems that the plugin does not list the files which Pro Builder uses, that is why I could not do anything.

The most important file which initiates the builder functionality is this:

pro/cornerstone/assets/dist-app/js/cs.js

That file is getting minified, kindly contact the plugin developer and ask them how to exclude that file as it is not showing in the list of files in the plugin settings.

I tried to change the main URL of the builder from builder back to x with no result.

This matter needs to be followed up with the developer of the plugin. The file above that I mentioned is still is getting minified and mixed.

Thank you.

Thanks @christopher.amirian, so if I manage to exclude that file the builder should load again?

Hi there,

Yes, and if you find the way to do so and it is still constant loading icon appears to get back to us to check the case again and see if there is any other additional factor in play.

Thank you.

Ok thanks!

You’re welcome.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.