Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Make non-minified js not accessible

Avatar

Level 4

Hello!

Is it somehow possible to make them not accessible in production environments? What's the best solution?

- Delete the non-minified version of the js scripts?

- Add a rule at dispatcher level that blocks js files requests not containing "min" in the URL?

 

Thank you!

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

You should not delete the non-minified JS versions as they will be needed by the client library manager to build the minified versions. So, the recommended option is to use dispatcher and block those unnecessary requests. 

View solution in original post

3 Replies

Avatar

Correct answer by
Employee Advisor

You should not delete the non-minified JS versions as they will be needed by the client library manager to build the minified versions. So, the recommended option is to use dispatcher and block those unnecessary requests. 

Avatar

Level 4

Thank you very much for your response! I appreciate it. I thought that the non-minified version was actually needed by the minification process. It would be grat to refine the process like this:

- every time there's a new non-minified version, start minification process

- when finished delete the non-minified version

 

But, again, maybe adding the dispatcher rule is the best solution!

Avatar

Level 10

Actually, you can push only minified version to prod