Oct 30, 2022
0
Level 63
How can I use a Brotli compressed JS file ?
Hello,
I just tried to use laravel-mix-compress, I have added mix.compress() in the webpack file and I get 2 more files for each JS : *.js.gz and *.js.br in the public directory.
How can I use the compressed file instead of the normal JS file ?
I have search on the web, I have found sveral tools to minify, to compress, ... but no example to include the compressed file inside the head.
I have tried this but it doesn't work.
<script src="{{ mix('js/app.js.br') }}"></script>
...
<script src="js/app.js.br"></script>
Sure I have to decompress the file or find some way to import the compressed file, but I really don't know how to do.
Any idea ?
Thank you ;).
V
Please or to participate in this conversation.