Skip to content
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

chore(docs): Tweak tsconfig for using typescript. #23596

Merged
merged 1 commit into from
Apr 30, 2020

Conversation

benrobertsonio
Copy link
Contributor

@benrobertsonio benrobertsonio commented Apr 29, 2020

Description

Tweaks some typescript settings to help avoid bundling issues.

Related Issues

closes #23595

Copy link

@AishaBlake AishaBlake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I came to the same conclusion reading the relevant docs. This doesn't seem to have caused any negative side effects (hehe), so I think we should go ahead and make this change.

@AishaBlake
Copy link

Merging as I've checked with Core in the past about reviewing code in /examples!

@AishaBlake AishaBlake merged commit dc9cdfc into gatsbyjs:master Apr 30, 2020
@benrobertsonio benrobertsonio deleted the using-typescript-change branch April 30, 2020 15:40
@@ -2,7 +2,7 @@
"include": ["./src/**/*"],
"compilerOptions": {
"target": "esnext",
"module": "commonjs",
"module": "esnext",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TypeScript compiler throws unless this is commonjs on Gatsby as of 2.23.4 (current release). Given this example is intended to help individuals get started with TypeScript the current setting leads to a poor DX:

Screen Capture_select-area_20200618214101

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @balibebas! would you be able to open a new issue for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider changing Using Typescript default tsconfig.json
2 participants