-
Notifications
You must be signed in to change notification settings - Fork 27.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
example/with-typescript-plugin #3698
Conversation
examples/with-typescript2/.gitignore
Outdated
@@ -0,0 +1 @@ | |||
*.js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not an expert of TS but do we still need to ignore .js files if we are using the webpack loader? I think we are now just using .tsx
as a native file format.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, Let me delete it
examples/with-typescript2/README.md
Outdated
npm run dev | ||
``` | ||
|
||
Output JS files are aside the related TypeScript ones. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed that line
@@ -0,0 +1,20 @@ | |||
{ | |||
"name": "with-typescript2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can either remove the old example and use this or name it with-typescript-plugin
, what do you think @timneutkens?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe maintain the old one for compatibility with old Next.js versions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace with-typescript2 -> with-typescript-plugin
"compilerOptions": { | ||
"target": "esnext", | ||
"module": "esnext", | ||
"jsx": "preserve", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need to preserve JSX?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this option from https://github.com/zeit/next-plugins/tree/master/packages/next-typescript
I’ve tested styled-jsx with jsx option removal,
It works well, I removed from code
@deptno awesome (and super fast) work! |
I think we don't need to the keep the existing. I think this is a great improvement for the existing example and it's no longer will be needed. @timneutkens your call. |
yeah please make this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Hi guys, I just used your example to start a new project and noticed this error message from in VSCode: After a bit of googling, I could solve this by adding What made you remove this key from the config? Should we bring it back? |
@kachkaev the example should reflect: https://github.com/zeit/next-plugins/tree/master/packages/next-typescript#usage, feel free to create a pull request 🙏 |
#3694