I can't find documentation on how to minimize assets and produce *.min.js files using vue cli. Im using vue cli version 4.2.3.
I require the extention to be *.min.js for rollbar to function correctly.
How would you go about configuring vue cli to produce minimized assets? (no TS involved).
I'm sure Vue CLI minifies JS output when running
build
in production mode. It's just using different naming convention (no "min.js")To tweak file names of JS chunks produced by Vue CLI, you can do the following:
Check the default Webpack config Vue CLI uses by running
vue inspect
on command line (dev mode) orvue inspect --mode production
(production mode)Look for an
output
(should be near the beginning of the output). In my project it looks like this:Dev mode:
Production mode:
Now you can tweak it - add vue.config.js to your project if you don't have it already and add following:
[name]
and[contenthash:8]
are Webpack placeholders - more info in documentation