Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Embed stats only when needed

Chocobozzz33a53638c2b7
diff --git a/scripts/build/client.sh b/scripts/build/client.sh
index 5ecbff28d4..e891b217cc 100755
--- a/scripts/build/client.sh
+++ b/scripts/build/client.sh
@@ -69,6 +69,8 @@ else
additionalParams=""
if [ ! -z ${1+x} ] && [ "$1" == "--analyze-bundle" ]; then
additionalParams="--namedChunks=true --outputHashing=none"
+
+ # For webpack
export ANALYZE_BUNDLE=true
fi
diff --git a/scripts/build/embed.sh b/scripts/build/embed.sh
index a243ce6409..66044759fd 100755
--- a/scripts/build/embed.sh
+++ b/scripts/build/embed.sh
@@ -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