0

I have enabled merging for javascript and css from my magento 2 store admin panel. But I can still see all the css coming unmerged in my view source. Javascript merge is working fine and coming merged. Any help here would be appreciated.

I have already set magento to production mode.

enter image description here

enter image description here

asked Aug 1, 2017 at 7:46
2
  • Did u run setup:upgrade and setup:static-content:deploy commands after enabling merging in Admin? Commented Aug 1, 2017 at 7:54
  • Yes. multiple times. Commented Aug 1, 2017 at 7:56

3 Answers 3

0

My first port of call would be to delete pub/static/frontend/ and var/view_preprocessed and then clear all caches (Magento and browser cache).

answered Aug 1, 2017 at 9:49
0

Delete pub/static/ and var/view_preprocessed manually and then run content:deploy command.

It should work.

Note: Make sure you are on Production mode.

answered Aug 1, 2017 at 9:53
2
  • 1
    I wouldn't recommend deleting pub/static, doing so will remove .htaccess which can cause issues. Commented Aug 1, 2017 at 12:09
  • Yes. You have to keep .htaccess and remove other content. Commented Aug 1, 2017 at 12:13
0

I found the issue. A Third part plugin css was creating the issue. It was not getting minified as well. Commenting it from the xml did the trick.

answered Aug 3, 2017 at 8:51

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.