mirror of
https://github.com/swc-project/swc.git
synced 2024-12-18 11:11:30 +03:00
74fd353053
swc_ecma_minifier: - `collapse_vars`: Respect `mutated`. (Closes #2679) - Add a test for https://github.com/vercel/next.js/issues/31084.
21 lines
526 B
Bash
Executable File
21 lines
526 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -eu
|
|
|
|
# Usage: Invoke this script using full path from a next app.
|
|
|
|
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
|
echo "Script dir: $SCRIPT_DIR"
|
|
export NEXT_DEBUG_MINIFY=1
|
|
|
|
# Remove preovious builds
|
|
rm -rf .next
|
|
|
|
# Install latest canary
|
|
yarn add next@canary
|
|
|
|
# This is not useful data, as this is a script used only by me (@kdy1)
|
|
npx next telemetry disable
|
|
|
|
npx next build | grep '{ name:' | node "$SCRIPT_DIR/evaluate.js"
|
|
touch "$SCRIPT_DIR/../../tests/compress.rs"
|