You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 26, 2019. It is now read-only.
The apparent recommended solution for achieving absolute imports, most recently referenced in #119, is to add a node_modules folder or symlink in src. Because NODE_PATH doesn't work in Typescript, I believe this is the only way to do absolute imports in create-react-app-typescript.
However, I am seeing jest tests choke when using such imports with SyntaxError: Unexpected token export errors.
Weirdly this may be somehow related to using enums? See the reproducible demo below.
Expected behavior
Expect jest tests to work.
Actual behavior
Jest fails with:
SyntaxError: Unexpected token export
at ScriptTransformer._transformAndBuildScript (node_modules/jest-runtime/build/ScriptTransformer.js:289:17)
at Object.<anonymous> (src/App.tsx:15:17)
at Object.<anonymous> (src/App.test.tsx:5:13)