-
Notifications
You must be signed in to change notification settings - Fork 319
TypeScript plugin does not work #84
Comments
Maybe related to storybookjs/storybook#3044 |
Next is not using webpack 4 (yet), 🤔 |
Yep, that's why in docs and other places it should say:
|
I'm not following, ts-loader is a dependency of next-typescript: https:/zeit/next-plugins/blob/master/packages/next-typescript/package.json#L8 We don't document anything related to ts-loader. And the version used is 3.x. |
My bad, let me give a bit more background how I ended up with this issue. I tried TS example from https://zeit.co/blog/next5 (so I manually installed That's what I meant about updating the docs, there's nothing to do with this particular repo I presume. |
JSX typechecks also not working in Next 5. For example, we have: // pages/index.tsx
import * as React from 'react'
import Title from '../components/Title'
export default () => (
<div>
<Title name={2}/>
<p>Super intresting page content</p>
</div>
) // components/Title.tsx
import * as React from 'react'
export default ({ name } : { name: string }) => (
<h1>{name}</h1>
) There is a JSX type error in {
"compileOnSave": false,
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"jsx": "react",
"moduleResolution": "node",
"sourceMap": true,
"baseUrl": "."
}
} |
Workaround - in Now JSX typechecks is working, but I'm suspect it would entail other problems. |
I have the same problem as @queses , compilation doesn't fail on TS errors |
I don't see how the last 3 comments relate to the issue. Other than it mentioning typescript, so I'm going to lock the conversation. For the record, it is expected that we don't handle typescript errors. They're disabled as per the documentation of ts-loader, and it's best to use an external type checker. |
Config:
Page:
Outcome:
The text was updated successfully, but these errors were encountered: