Expand my Community achievements bar.

Join us in celebrating the outstanding achievement of our AEM Community Member of the Year!
SOLVED

Does EDS handle javascript and CSS minification and versioning?

Avatar

Level 4

This is a 2 part question regarding EDS handling of javascript and CSS.

 

Part 1: AEM 6.5 has a feature that minifies javascript and CSS. Does EDS have a similar ability or is this an optimization step that must happen inside the GIT repo?

 

Part 2: Adobe AEM Commons has a "Versioned Clientlibs" feature that adds a new cache-busting string to a file path when a clientlib is updated. Does EDS have a similar ability or is there some other process?

1 Accepted Solution

Avatar

Correct answer by
Level 8

Hi @andyshreve ,

 

1) EDS doesn't have this feature out of the box. However, there is an example how you can use SCSS for your project: https://github.com/sachioross/helix-project-boilerplate-sass . Based on this example you can implement minifying.

Note: most likely you will need to keep 2 version of files in repo: {resource}.scss, {resource}.min.css, {resource}.js, {resource}.min.js

2) EDS doesn't have this feature out of the box and it's not needed, because JS/CSS are returned with ETag and Last-Modified header that solves problem with cache as well. I'd not suggest applying long term caching for your JS/CSS with additional headers feature. 

 

Best regards,

Kostiantyn Diachenko.

View solution in original post

1 Reply

Avatar

Correct answer by
Level 8

Hi @andyshreve ,

 

1) EDS doesn't have this feature out of the box. However, there is an example how you can use SCSS for your project: https://github.com/sachioross/helix-project-boilerplate-sass . Based on this example you can implement minifying.

Note: most likely you will need to keep 2 version of files in repo: {resource}.scss, {resource}.min.css, {resource}.js, {resource}.min.js

2) EDS doesn't have this feature out of the box and it's not needed, because JS/CSS are returned with ETag and Last-Modified header that solves problem with cache as well. I'd not suggest applying long term caching for your JS/CSS with additional headers feature. 

 

Best regards,

Kostiantyn Diachenko.