mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Analyze embed too with bundlewatch
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
set -eu
|
||||
|
||||
gawk -i inplace 'BEGIN { found=0 } { if (found || $0 ~ /^{/) { found=1; print }}' ./client/dist/embed-stats.json
|
||||
gawk -i inplace 'BEGIN { found=0 } { if (found || $0 ~ /^{/) { found=1; print }}' ./client/dist/standalone/videos/embed-stats.json
|
||||
|
||||
npm run concurrently -- -k \
|
||||
"cd client && npm run webpack-bundle-analyzer -- -p 8888 ./dist/en-US/stats-es2015.json" \
|
||||
"cd client && npm run webpack-bundle-analyzer -- -p 8889 ./dist/embed-stats.json"
|
||||
"cd client && npm run webpack-bundle-analyzer -- -p 8889 ./dist/standalone/videos/embed-stats.json"
|
||||
|
||||
Reference in New Issue
Block a user