Open swojdyga opened 2 years ago
Mostly the same code is being typechecked, but could add a option to turn on for both
That's true, but on the other hand there can be a lot of unique code on server side, for example getting products - on client side getting products could be realized via API, but on server side could be realized via connecting to redis cache server (it's much faster).
I think better is get same errors two times than getting no errors.
🐛 Bug report
Current Behavior
No type checking in server build.
Expected behavior
With typescript plugin, code in server build should be type checking like client build.
Reproducible example
Suggested solution(s)
I removed condition "opts.env.target === 'web'" from razzle-plugin-typescript/index.js:73 and type checking on server build works fine.
Additional context
Your environment