My previous tsconfig.json had the following option:
"module": "commonjs",
To get lazy loading React components to work I had to change it to this:
"module": "esnext",
"moduleResolution": "node",
Which works for lazy loading but other parts of the app I'm working on broke because those parts uses require
syntax. Is there a way to keep those working with the new tsconfig values?
Or a way to define multiple configs per project that way I can keep the original and define an additional tsconfig in the places where I need lazy loading?