-
I'm using next.js and Typescript, everything compiles fine, when I try to follow any page I see in console (SSR from next) errors which occurred by undefined imports. I got that any .tsx file that contains react-syntax ( If I use statefull component and return My .babelrc:
My tsconfig.json:
next.config.js is regular one, nothing used to extend functionality. Previously everything worked fine, but I've integrated eslint instead of tslint and had much corrections. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I resolved the problem by changing tsconfig.json parameter target to |
Beta Was this translation helpful? Give feedback.
I resolved the problem by changing tsconfig.json parameter target to
es2020
and module toesnext
, so for some reason it works fine now.I had the problem above because I need to parse ts to
es5
because I start the server by regular node command ./server/index.js (no imports will be understand).So now I have 2 tsconfig.json files with server and client configurations