ApostropheCMS 2 CSS Issue

85 Views Asked by At

I've one apostrophe CMS 2 project where I am trying to make changes in the css file which resides in "lib\modules\apostrophe-assets\public\css\site.css" and there is another minify css file generated in public\css\master-anon-cl2eiqkd30003wwb6kl1553jg.less.

So whatever i make changes in minify files it reflects in front side and if I do that changes in 'lib\modules\apostrophe-assets\public\css\site.css' it didn't reflect.

Then I've fired below command to minify this files node app apostrophe:generation Ref Link # : https://v2.docs.apostrophecms.org/devops/deployment/deployment.html#always-minify-before-startup

After firing this command than new scripts & styles are created but however changes are not getting reflected in the test server and website styles gets messed up.

Could you please suggest any solution

1

There are 1 best solutions below

1
Ricardo On

Hi I don't know if this is going to help you, but try to add this peace of code to your module, widget

enter code here
 construct: function(self, options){
  var superPushAssets = self.pushAssets;
  self.pushAssets = function(){
    superPushAssets();
    self.pushAsset('stylesheet', 'style-name', {when: 'always'};
};

};