Is there a way to exclude specific JavaScript files from Asset Optimizer. I know you can globally turn off Asset Optimizer or even do it at a site level. Is there a way to do it a file level or even the theme level?

  • You can upload pre-optimized files and then turn off the Asset Optimizer for your site. – Michael West Nov 14 '19 at 22:52
  • Unfortunately SXA has multiple javascript files in the base theme that are not in our code base since we are including it. – Pradeep Nov 16 '19 at 19:42

There is no configuration to enable/disable asset optimization on a theme/file level. SXA Theming and the Asset Optimizer considers the files uploaded under Scripts and Styles for optimization and to load on the website. You need to upload your file outside this location and refer accordingly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.