Laravel not load my edited js file I edited my resources/assets/js/app.js file, run npm run production and upload to the server.
On my local VM, the new js file is loaded on the page. But on production server, Laravel still loading old version.
I clean the browser cache and checked that the new file is uploaded.
maybe you are behind a proxy that caches the old js-file?
@Dunsti , is there a way to solve this?
are you versioning your files with mix?
as @Cronix said: if you are versioning your js-files, the filename will be different with every update of the file, and this cannot be cached (because of different filenames)
@Cronix
I try without success.
I add <script type="text/javascript" src="{{ mix('js/app.js') }}"></script> in master.blade.php file and change webpack.mix.js to this:
mix.js('resources/assets/js/app.js', 'public/js').sass('resources/assets/sass/app.scss', 'public/css').version();
My public/mix-manifestjson was correct, but Laravel return The Mix manifest does not exist.
Found the problem: the files are cached by Cloudflare.
Please sign in or create an account to participate in this conversation.