mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-04-24 05:05:53 +08:00
Set baseUrl from jsconfig.json/tsconfig.json (#6656)
* Set baseUrl from jsconfig.json/tsconfig.json * Resolve the path for loading modules * Add tests for jsconfig.json * Add jsconfig.json * Update packages/react-scripts/scripts/start.js * Move baseUrl test to config folder * Remove alias test * Use chalk from react-dev-utils * Add lost absolute file for typescript baseUrl test * Update packages/react-scripts/config/modules.js * Update other references of useTypeScript to hasTsConfig * Fix casing of TypeScript * Keep respecting NODE_PATH for now to support multiple module paths. * Add test for NODE_PATH * Add fallback if NODE_PATH is not set. * Fix node path behavior tests * Remove debugging code from behavior test suite * Remove more debugging code * Show NODE_PATH deprecation warning during build Co-authored-by: Ian Sutherland <ian@iansutherland.ca> Co-authored-by: Brody McKee <mrmckeb@users.noreply.github.com> Co-authored-by: Jack Zhao <jzhao@fb.com>
This commit is contained in:
committed by
Ian Sutherland
parent
ced3fd49ca
commit
e7a2d6168a
@@ -123,7 +123,6 @@ npm link "$temp_module_path/node_modules/test-integrity"
|
||||
|
||||
# Test the build
|
||||
REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \
|
||||
NODE_PATH=src \
|
||||
PUBLIC_URL=http://www.example.org/spa/ \
|
||||
yarn build
|
||||
|
||||
@@ -135,7 +134,6 @@ exists build/static/js/main.*.js
|
||||
# https://facebook.github.io/jest/docs/en/troubleshooting.html#tests-are-extremely-slow-on-docker-and-or-continuous-integration-ci-server
|
||||
REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \
|
||||
CI=true \
|
||||
NODE_PATH=src \
|
||||
NODE_ENV=test \
|
||||
yarn test --no-cache --runInBand --testPathPattern=src
|
||||
|
||||
|
||||
@@ -65,6 +65,9 @@ case ${test_suite} in
|
||||
"installs")
|
||||
test_command="./tasks/e2e-installs.sh"
|
||||
;;
|
||||
"behavior")
|
||||
test_command="./tasks/e2e-behavior.sh"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user