From a3b5e78af3696f807e54bc4b11e559bbd9b6ba1e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 6 Aug 2020 10:26:39 +0200 Subject: Analyze embed too with bundlewatch --- scripts/build/client.sh | 5 ++--- scripts/build/embed.sh | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts/build') diff --git a/scripts/build/client.sh b/scripts/build/client.sh index 254ca4364..878de60df 100755 --- a/scripts/build/client.sh +++ b/scripts/build/client.sh @@ -33,6 +33,7 @@ pre_build_hook additionalParams="" if [ ! -z ${1+x} ] && [ "$1" == "--analyze-bundle" ]; then additionalParams="--namedChunks=true --outputHashing=none" + export ANALYZE_BUNDLE=true fi @@ -154,9 +155,7 @@ if [ -z ${1+x} ] || ([ "$1" != "--light" ] && [ "$1" != "--analyze-bundle" ]); t done fi -if [ ! -z ${1+x} ] || [ "$1" == "--analyze-bundle" ]; then - cd ../ && npm run build:embed && cd client/ -fi +cd ../ && npm run build:embed && cd client/ # Copy runtime locales cp -r "./src/locale" "./dist/locale" diff --git a/scripts/build/embed.sh b/scripts/build/embed.sh index 4be2afc25..3fcfc6ba2 100755 --- a/scripts/build/embed.sh +++ b/scripts/build/embed.sh @@ -4,4 +4,5 @@ set -eu cd client -NODE_ENV=production npm run webpack -- --config webpack/webpack.video-embed.js --mode production --json > "./dist/embed-stats.json" +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" -- cgit v1.2.3