swc/crates/swc_webpack_ast/scripts/test-next.sh
Donny/강동윤 24179bd9be
fix(webpack/ast): Handle typescript (#3045)
swc_webpack_ast:
 - Add `proces_file`.
 - Add support for typescript.
2021-12-15 18:33:35 +09:00

16 lines
415 B
Bash
Executable File

#!/usr/bin/env bash
set -eu
# This script tests if webpack ast is identical to webpack ast produced by acorn,
# by running webpack via next.js
export RUST_BACKTRACE=1
cargo test --no-run
UPDATE=1 cargo test -q
(cd next.js/packages/next-swc && yarn build-native --release)
(cd next.js && NEXT_PRIVATE_LOCAL_WEBPACK5=1 yarn testheadless $@ || true)
(cd next.js && NEXT_PRIVATE_LOCAL_WEBPACK5=1 yarn next dev $@)