In my Sage theme I created a data
folder in resources/assets/
with two JSON file. They contain data, what my theme uses.
I modified the resources/assets/build/config.js
file, to copy the data
folder with the images
folder:
...
const config = merge({
open: true,
copy: '+(images|data)/**/*',
...
It’s works great, but I wish to minify my .json
files. The original files are nicely indented, but they are half the size if I remove spaces and newlines manually.
Any suggestions, how to do it programatically?
P.s.: I never used webpack before.