Following Laravel's documentation, he says that it is unnecessary to keep the css and js in development, which I think is correct. Then I did the following, I have in webpack.mix.js:
mix.js('resources/assets/js/app.js', 'public/js')
.js('resources/assets/js/mol.js', 'public/js')
.sass('resources/assets/sass/app.scss', 'public/css')
.sass('resources/assets/sass/mol.scss', 'public/css')
.sass('resources/assets/sass/login.scss', 'public/css');
if (mix.inProduction()) {
mix.version();
}
On the .env I have
APP_ENV = production
and to compile I do npm run production, but it does not work for me. This way you do not add the hash to the js and css.
Now if I add .version to the end of mix.js (...). version (); there if I walk, but both in development mode and in production mode.