Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(webpack): stop page reloads on twig file save #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

moacode
Copy link

@moacode moacode commented Nov 19, 2020

@mikedaviesweb this one is for you 🍺🍺🍺🍺🍺🍺

What I did

A simple change to the dev server watchOptions-->ignored setting to prevent the web page from reloading when twig files are saved.

How to test

  1. Run the webpack dev-server and save a twig file. The page should not reload.
  2. Save a css/js/vue file and the hot reloading should kick in.

Note: A simple way to test is to fire up the craft starter project and replace the contents of webpack.dev.js in your node_modules with the file from this repo.

@moacode moacode self-assigned this Nov 19, 2020
@rb1193
Copy link

rb1193 commented Nov 20, 2020

Personally I quite like it that my page gets reloaded when I update a template. Not too fussed either way though

@hatzipanis
Copy link
Member

Personally I quite like it that my page gets reloaded when I update a template. Not too fussed either way though

Yes, me too @rb1193! Obviously I don't mind as I'm not on the tools so much these days but perhaps we can chat together about this one at stand up tomorrow.

@hatzipanis
Copy link
Member

As discussed in the standup meeting this morning, we've decided to continue to reload twig files on save however add a flag/ environment variable to allow this to be overridden for devs that need it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants