Ability to omit paths from refresh
See original GitHub issueIt’s super straightforward to include paths to look at for triggering a refresh, but it would be really helpful to be able to also define paths to exclude. The use case for me is that I’d like to omit resources/views/livewire/**
and instead let the vite-livewire-plugin handle hot-reloading when those files change.
I was able to cobble together something that works based on the old workaround to get full page refresh working when blade files change by explicitly ensuring the triggering file(s) don’t include /livewire/
in their path name.
But it would be much nicer to, instead of this:
{
name: 'blade',
handleHotUpdate({ file, server }) {
if ((file.includes('routes/') || file.endsWith('.blade.php')) && !file.includes('/livewire/')) {
server.ws.send({
type: 'full-reload',
path: '*',
})
}
},
}
Simply be able to do something like this:
{
laravel({
// ...
refresh: ['resources/views/**'],
omit: ['resources/views/livewire/**'],
}),
}
Issue Analytics
- State:
- Created a year ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Exclude from refresh certain files for a folder data source
In Power BI desktop, we can enable/disable a query to be refreshed when clicking on the Refresh button in the top ribbon in...
Read more >Forcing a React-Router <Link> to load a page, even if we're ...
Just adding a state does yield a new location , but now we can't "reload" the same path + state anymore without changing...
Read more >Power BI - Disable Refresh of Local and Unsupported Data ...
Hey guys! Parker here. In this Power BI tutorial, I'm going to demonstrate how to hard code your data that doesn't need to...
Read more >Disable refresh in Power Bi for local sources and more
You have asked me if it is possible to disable refresh on local sources and the answer is yes in the Power BI...
Read more >?refresh | Elasticsearch Guide [8.5] | Elastic
The simplest and fastest choice is to omit the refresh parameter from the URL. If you absolutely must have the changes made by...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@willvincent you can create a glob pattern to match your requirements. Under the hood, picomatch is used, so the following should work for your needs…
You can learn more in the picomatch documentation: https://github.com/micromatch/picomatch#advanced-globbing
Just downgraded to vite 2.9 and it’s all good!
🎉🤘