]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - scripts/build/embed.sh
Embed stats only when needed
[github/Chocobozzz/PeerTube.git] / scripts / build / embed.sh
index a243ce64095301f174871a8ac7035cdc71263af3..66044759fd228e77cec930426a366e3b8da60df5 100755 (executable)
@@ -6,4 +6,8 @@ cd client
 
 mkdir -p ./dist/standalone/videos/
 
-NODE_ENV=production npm run webpack -- --config webpack/webpack.video-embed.js --mode production --json > "./dist/standalone/videos/embed-stats.json"
+if [ ! -z ${ANALYZE_BUNDLE+x} ] && [ "$ANALYZE_BUNDLE" == true ]; then
+  NODE_ENV=production npm run webpack -- --config webpack/webpack.video-embed.js --mode production --json > "./dist/standalone/videos/embed-stats.json"
+else
+  NODE_ENV=production npm run webpack -- --config webpack/webpack.video-embed.js --mode production
+fi