Skip to main content
added 2 characters in body
Source Link

Option 1: You can disable minification for debugging.

To change the optimization settings for a specific site:

In the Content Editor, navigate to sitecore/content/<Tenant>/<Site>/Presentation/Page Designs.

In the Asset Optimization section, in the Styles Optimizing Enabled and Scripts Optimizing Enabled fields, to override styles and scripts optimization settings, select:

  1. Default – to inherit global settings

  2. Yes – to always enable optimization for this site.

  3. No – to always disable optimization for this site.

enter image description here

Option 2: Visit the config.js included with the SXA theme. Making the configuration changes below will result in a pre-optimized-min file bundled with the variable/function names intact.

Here are the original minifyOptions provided:

minifyOptions: {
    js: {
        compress: {
            hoist_funs: true,
            passes: 1
        },
        toplevel: false
    },
    css: { compatibility: 'ie8' }
}

Here are the updated minifyOptions:

minifyOptions: {
    js: {
        compress: false,
        mangle: false,
        toplevel: false
    },
    css: { }
}

Note:Note: SXA makes use of the npm-uglify-es and npm-clean-css packages.

For 2nd option follow - How do I disable minification for pre-optimized-min items in my theme?

Option 1: You can disable minification for debugging.

To change the optimization settings for a specific site:

In the Content Editor, navigate to sitecore/content/<Tenant>/<Site>/Presentation/Page Designs.

In the Asset Optimization section, in the Styles Optimizing Enabled and Scripts Optimizing Enabled fields, to override styles and scripts optimization settings, select:

  1. Default – to inherit global settings

  2. Yes – to always enable optimization for this site.

  3. No – to always disable optimization for this site.

enter image description here

Option 2: Visit the config.js included with the SXA theme. Making the configuration changes below will result in a pre-optimized-min file bundled with the variable/function names intact.

Here are the original minifyOptions provided:

minifyOptions: {
    js: {
        compress: {
            hoist_funs: true,
            passes: 1
        },
        toplevel: false
    },
    css: { compatibility: 'ie8' }
}

Here are the updated minifyOptions:

minifyOptions: {
    js: {
        compress: false,
        mangle: false,
        toplevel: false
    },
    css: { }
}

Note: SXA makes use of the npm-uglify-es and npm-clean-css packages.

For 2nd option follow - How do I disable minification for pre-optimized-min items in my theme?

Option 1: You can disable minification for debugging.

To change the optimization settings for a specific site:

In the Content Editor, navigate to sitecore/content/<Tenant>/<Site>/Presentation/Page Designs.

In the Asset Optimization section, in the Styles Optimizing Enabled and Scripts Optimizing Enabled fields, to override styles and scripts optimization settings, select:

  1. Default – to inherit global settings

  2. Yes – to always enable optimization for this site.

  3. No – to always disable optimization for this site.

enter image description here

Option 2: Visit the config.js included with the SXA theme. Making the configuration changes below will result in a pre-optimized-min file bundled with the variable/function names intact.

Here are the original minifyOptions provided:

minifyOptions: {
    js: {
        compress: {
            hoist_funs: true,
            passes: 1
        },
        toplevel: false
    },
    css: { compatibility: 'ie8' }
}

Here are the updated minifyOptions:

minifyOptions: {
    js: {
        compress: false,
        mangle: false,
        toplevel: false
    },
    css: { }
}

Note: SXA makes use of the npm-uglify-es and npm-clean-css packages.

For 2nd option follow - How do I disable minification for pre-optimized-min items in my theme?

edited body
Source Link

Option 1: You can disable minification for debugging.

To change the optimization settings for a specific site:

In the Content Editor, navigate to sitecore/content/<Tenant>/<Site>/Presentation/Page Designs.

In the Asset Optimization section, in the Styles Optimizing Enabled and Scripts Optimizing Enabled fields, to override styles and scripts optimization settings, select:

  1. Default – to inherit global settings

  2. Yes – to always enable optimization for this site.

  3. No – to always disable optimization for this site.

enter image description here

Option 2:Option 2: Visit the config.js included with the SXA theme. Making the configuration changes below will result in a pre-optimized-min file bundled with the variable/function names intact.

Here are the original minifyOptions provided:

minifyOptions: {
    js: {
        compress: {
            hoist_funs: true,
            passes: 1
        },
        toplevel: false
    },
    css: { compatibility: 'ie8' }
}

Here are the updated minifyOptions:

minifyOptions: {
    js: {
        compress: false,
        mangle: false,
        toplevel: false
    },
    css: { }
}

Note:: SXA makes use of the npm-uglify-es and npm-clean-css packages.

For 2nd option follow - How do I disable minification for pre-optimized-min items in my theme?

Option 1: You can disable minification for debugging.

To change the optimization settings for a specific site:

In the Content Editor, navigate to sitecore/content/<Tenant>/<Site>/Presentation/Page Designs.

In the Asset Optimization section, in the Styles Optimizing Enabled and Scripts Optimizing Enabled fields, to override styles and scripts optimization settings, select:

  1. Default – to inherit global settings

  2. Yes – to always enable optimization for this site.

  3. No – to always disable optimization for this site.

enter image description here

Option 2: Visit the config.js included with the SXA theme. Making the configuration changes below will result in a pre-optimized-min file bundled with the variable/function names intact.

Here are the original minifyOptions provided:

minifyOptions: {
    js: {
        compress: {
            hoist_funs: true,
            passes: 1
        },
        toplevel: false
    },
    css: { compatibility: 'ie8' }
}

Here are the updated minifyOptions:

minifyOptions: {
    js: {
        compress: false,
        mangle: false,
        toplevel: false
    },
    css: { }
}

Note: SXA makes use of the npm-uglify-es and npm-clean-css packages.

For 2nd option follow - How do I disable minification for pre-optimized-min items in my theme?

Option 1: You can disable minification for debugging.

To change the optimization settings for a specific site:

In the Content Editor, navigate to sitecore/content/<Tenant>/<Site>/Presentation/Page Designs.

In the Asset Optimization section, in the Styles Optimizing Enabled and Scripts Optimizing Enabled fields, to override styles and scripts optimization settings, select:

  1. Default – to inherit global settings

  2. Yes – to always enable optimization for this site.

  3. No – to always disable optimization for this site.

enter image description here

Option 2: Visit the config.js included with the SXA theme. Making the configuration changes below will result in a pre-optimized-min file bundled with the variable/function names intact.

Here are the original minifyOptions provided:

minifyOptions: {
    js: {
        compress: {
            hoist_funs: true,
            passes: 1
        },
        toplevel: false
    },
    css: { compatibility: 'ie8' }
}

Here are the updated minifyOptions:

minifyOptions: {
    js: {
        compress: false,
        mangle: false,
        toplevel: false
    },
    css: { }
}

Note: SXA makes use of the npm-uglify-es and npm-clean-css packages.

For 2nd option follow - How do I disable minification for pre-optimized-min items in my theme?

Source Link

Option 1: You can disable minification for debugging.

To change the optimization settings for a specific site:

In the Content Editor, navigate to sitecore/content/<Tenant>/<Site>/Presentation/Page Designs.

In the Asset Optimization section, in the Styles Optimizing Enabled and Scripts Optimizing Enabled fields, to override styles and scripts optimization settings, select:

  1. Default – to inherit global settings

  2. Yes – to always enable optimization for this site.

  3. No – to always disable optimization for this site.

enter image description here

Option 2: Visit the config.js included with the SXA theme. Making the configuration changes below will result in a pre-optimized-min file bundled with the variable/function names intact.

Here are the original minifyOptions provided:

minifyOptions: {
    js: {
        compress: {
            hoist_funs: true,
            passes: 1
        },
        toplevel: false
    },
    css: { compatibility: 'ie8' }
}

Here are the updated minifyOptions:

minifyOptions: {
    js: {
        compress: false,
        mangle: false,
        toplevel: false
    },
    css: { }
}

Note: SXA makes use of the npm-uglify-es and npm-clean-css packages.

For 2nd option follow - How do I disable minification for pre-optimized-min items in my theme?