Closed
Description
Describe the bug
const tsPattern = require('ts-pattern');
The tsPattern is a string but not a module on react-scripts 5, and other library is work.
Did you try recovering your dependencies?
(Write your answer here.)
Which terms did you search for in User Guide?
(Write your answer here if relevant.)
Environment
(paste the output of the command here.)
Steps to reproduce
(Write your steps here:)
- npx create-react-app ts-pattern-test
- cd ts-pattern-test
- pnpm add ts-pattern
- code in src/index.js:
const tsPattern = require('ts-pattern');
Expected behavior
The tsPattern should be a module be return a string on react-scripts 5, and other library is work.
Actual behavior
(Write what happened. Please add screenshots!)
Reproducible demo
(Paste the link to an example project and exact instructions to reproduce the issue.)