X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=scripts%2Fbuild%2Fclient.sh;h=e891b217ccef72a2601a9200d2aa179ca32997a4;hb=36e5e1d7a68aeb59e2cf17691c922213b606b249;hp=91147fc51d3867e599c4cc8202e0d5ddda8fe226;hpb=b1ed448e948211a59ab110c9d4c7c2e82819645e;p=github%2FChocobozzz%2FPeerTube.git diff --git a/scripts/build/client.sh b/scripts/build/client.sh index 91147fc51..e891b217c 100755 --- a/scripts/build/client.sh +++ b/scripts/build/client.sh @@ -40,7 +40,7 @@ languages=( cd client -rm -rf ./dist ./compiled +rm -rf ./dist # Don't build other languages if --light arg is provided if [ -z ${1+x} ] || ([ "$1" != "--light" ] && [ "$1" != "--analyze-bundle" ]); then @@ -49,7 +49,7 @@ if [ -z ${1+x} ] || ([ "$1" != "--light" ] && [ "$1" != "--analyze-bundle" ]); t additionalParams="--sourceMap=true" fi - npm run ng build -- --configuration production --output-path "dist/build" $additionalParams + node --max_old_space_size=8192 node_modules/.bin/ng build --configuration production --output-path "dist/build" $additionalParams for key in "${!languages[@]}"; do lang=${languages[$key]} @@ -69,10 +69,12 @@ else additionalParams="" if [ ! -z ${1+x} ] && [ "$1" == "--analyze-bundle" ]; then additionalParams="--namedChunks=true --outputHashing=none" + + # For webpack export ANALYZE_BUNDLE=true fi - npm run ng build -- --localize=false --output-path "dist/$defaultLanguage/" \ + node --max_old_space_size=8192 node_modules/.bin/ng build --localize=false --output-path "dist/$defaultLanguage/" \ --deploy-url "/client/$defaultLanguage/" --configuration production --stats-json $additionalParams fi