Override plugin's Javascript files without publishing?
Hello everyone 
I'm using some plugins, and I would like to make some modifications on some JS files.
I can publish these using filament:assets. The thing is, in the future, if I have to run that again, my modifications will be overwritten.
I was trying to replace the JS call in my AppServiceProvider, using something like:
But it doesn't overrwite, even if I set a package in the register method.
Maybe I'm looking on the wrong place, so if anyone can help me, I would appreciate it!
(I considered forking the plugins, but upgrading would be a messier work)
I'm using some plugins, and I would like to make some modifications on some JS files.
I can publish these using filament:assets. The thing is, in the future, if I have to run that again, my modifications will be overwritten.
I was trying to replace the JS call in my AppServiceProvider, using something like:
But it doesn't overrwite, even if I set a package in the register method.
Maybe I'm looking on the wrong place, so if anyone can help me, I would appreciate it!
(I considered forking the plugins, but upgrading would be a messier work)
Solution
So, the answer is quite simple:
This way, when you publish the files with filament:assets, you get your custom JS in your public folder.
- Put your updated file on your resources folder (/resources/js/custom/customfile.js)
- Register the asset with the package name in it in your AppServiceProvider
This way, when you publish the files with filament:assets, you get your custom JS in your public folder.