Embed stats only when needed
This commit is contained in:
parent
64ef55f7c8
commit
33a53638c2
|
@ -69,6 +69,8 @@ else
|
||||||
additionalParams=""
|
additionalParams=""
|
||||||
if [ ! -z ${1+x} ] && [ "$1" == "--analyze-bundle" ]; then
|
if [ ! -z ${1+x} ] && [ "$1" == "--analyze-bundle" ]; then
|
||||||
additionalParams="--namedChunks=true --outputHashing=none"
|
additionalParams="--namedChunks=true --outputHashing=none"
|
||||||
|
|
||||||
|
# For webpack
|
||||||
export ANALYZE_BUNDLE=true
|
export ANALYZE_BUNDLE=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -6,4 +6,8 @@ cd client
|
||||||
|
|
||||||
mkdir -p ./dist/standalone/videos/
|
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
|
||||||
|
|
Loading…
Reference in New Issue