1👍
You can add a script to minify your file and run it along with your build script like this:
// package.json
{
"scripts": {
"minify-embed": "uglifyjs public/embed.js",
"build": "yarn minify-embed && yarn build:client && yarn build:server",
}
}
But if your embed.js
is rarely changed, you just need to manually minify it and then put it in the public
folder
Source:stackexchange.com