Nov 11, 2020
0
Level 1
Minify/Compress JS file?
I see my js file already >700KB when compiling in production mode (in dev mode 2MB). I think it's still big, I'm wondering if I'm not doing it correctly because when I see the compiled app.js, it is not somewhat obfuscated or compressed, for example I see a variable name still stay as it is.
In my webpack.mix.js:
mix.js('resources/js/app.js', 'public/js')
and I ran npm run production.
I tried to use .extract() but it's just separating the file to vendor.js, the total size is more or less the same.
Is there anything else to do?
Please or to participate in this conversation.