Closed ElMassimo closed 3 years ago
Thanks for the PR! Isn't the plugin forcing a full page reload already, regardless of the path? However, I am not familiar with how the Vite client reacts to different paths
Normally it would, but it doesn't seem to work for these use cases, probably because these paths are outside of the root
.
I'll read the client to see if I can figure out what's going on. Hold on the merge for now 😃
It seems that when the modified file is an .html
file, Vite's client only reloads the page if the browser is currently in that HTML page.
Unfortunately, that logic does not work when the HTML file is outside the root, because:
const payloadPath = base + payload.path.slice(1)
will never match the URL.
This is why forcing *
is necessary for some use cases.
Okay, thanks for researching it further! Would you mind changing the name of the option to something more descriptive? For example alwaysReload
or forceReload
Sounds good, I like alwaysReload
.
At the moment I'm traveling, but I'll update the PR later today. Thanks!
Edit: Submitted the change.
Thank you! Just published the new version
Excellent, thanks!! 😃
Description 📖
This pull request closes #4 by adding an
always
configuration option that forces reload to happen regardless of the modified file paths.Usage 🚀