cancel
Showing results for 
Search instead for 
Did you mean: 

Grunt livereload or reloading the browser?

SOLVED

Grunt livereload or reloading the browser?

Hello

After some head scratching I have finally set up a local site for testing (M1 was easier Smiley Indifferent). I have also created a new theme thats inherits from the blank theme.

 

Question: when using

grunt watch

(with live reload) the page is updated according to the css (less) changes. But, if I then reload the browser, the change is reverted back?!

 

Why is it so?

 

Best,

Magnus

 

Sidenote: In my opinion, this is a "to smart" system which instead creates a huge complicity of files in different folders.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Grunt livereload or reloading the browser?

Hello @Brake6

 

maybe css calling from page cache, try to check into the inconito mode.

 

Hope it will help you.

 

 


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

View solution in original post

4 REPLIES 4

Re: Grunt livereload or reloading the browser?

@Brake6 in which mode do you run your site locally, you can check it with: 

bin/magento deploy:mode:show

If it isn't in developer mode you can change it by the following command:

 

bin/magento deploy:mode:set developer

Sandro Wagner from integer_net wrote a good article about the frontend workflow with Magento 2, see: https://www.integer-net.com/magento-2-frontend-workflow-step-by-step/

 

 

--
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution"

Re: Grunt livereload or reloading the browser?

Thanks mhauri

 

I'm in development mode (just double checked to be sure).

 

Yes, Sandros article is very good (the best one I have found so far on the workflow topic) Smiley Happy

Re: Grunt livereload or reloading the browser?

Hello @Brake6

 

maybe css calling from page cache, try to check into the inconito mode.

 

Hope it will help you.

 

 


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

Re: Grunt livereload or reloading the browser?

You are so right, Sunil!

And such a newbie mistake by me. Man Sad Reloading the browser without the cache (on Safari, cmd+alt+R) fixed it.

 

Thanks,

Magnus