Embed stats only when needed
This commit is contained in:
parent
64ef55f7c8
commit
33a53638c2
2 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue