improve on page documentation for: Exclude scripts from Autoptimize:
-
I just spent 30 minutes trying all combinations of paths and looking at everything trying to figure out why my exclude js file wasn’t working.
I finally tracked it down to the additional setting at the bottom of the page under misc:
Minify excluded CSS and JS files?
Which still moves the file even though you have excluded it.
I was trying to exclude it because the script with the problem was detecting its location and trying to use it in a relative path so I needed it to be fully out.
Please consider putting a mention of this in the hint which explains the exclude field.
Adding this bit so it hopefully comes up for the next dev that gets stuck on this:
This issue is caused by StencilJS, which generates web components. The script tag to include it just injects two additional scripts, one with module, one with nomodule attributes to deliver optimised code to different browsers. The url injected is relative to the main included javascript file.
The topic ‘improve on page documentation for: Exclude scripts from Autoptimize:’ is closed to new replies.