Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Make non-minified js not accessible

boser87
Level 4
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
kunal23
Correct answer by
Level 10
Level 10

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
kunal23
Correct answer by
Level 10
Level 10

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. 

boser87
Level 4
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!

Lokesh_Shivalingaiah
Community Advisor
Community Advisor

Actually, you can push only minified version to prod