rsnext/test-pnp.sh
Kristoffer K 104b8d4732
fix(next-mdx): resolve webpack loader (#17983)
**What's the problem this PR addresses?**

`@next/mdx` adds the webpack loader `@mdx-js/loader` without resolving it to an absolute path

Depends on https://github.com/vercel/next.js/pull/17606

**How did you fix it?**

`require.resolve` the webpack loader before adding it
2021-01-04 16:24:16 +00:00

31 lines
516 B
Bash

declare -a testCases=(
"with-typescript"
"with-next-sass"
"with-mdx"
)
set -e
# Speeds up testing locally
export CI=1
rm -rf ./e2e-tests
initialDir=$(pwd)
for testCase in "${testCases[@]}"
do
cd $initialDir
echo "--- Testing $testCase ---"
mkdir -p "./e2e-tests/$testCase"
cp -r "./examples/$testCase/." "./e2e-tests/$testCase"
cd "./e2e-tests/$testCase"
touch yarn.lock
yarn set version berry
yarn config set pnpFallbackMode none
yarn link --all --private -r ../..
yarn build
done