X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=scripts%2Fbuild%2Fembed.sh;h=66044759fd228e77cec930426a366e3b8da60df5;hb=2d40ca414e3e7cc86a87109dcb85a6d6fe3b0dea;hp=3fcfc6ba2ef0f9ac4fbf1430f66dfd791faa8718;hpb=a3b5e78af3696f807e54bc4b11e559bbd9b6ba1e;p=github%2FChocobozzz%2FPeerTube.git diff --git a/scripts/build/embed.sh b/scripts/build/embed.sh index 3fcfc6ba2..66044759f 100755 --- a/scripts/build/embed.sh +++ b/scripts/build/embed.sh @@ -5,4 +5,9 @@ set -eu 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