-
Notifications
You must be signed in to change notification settings - Fork 734
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add more fields to generated
tsconfig.json
(#142)
This PR adds some more fields to the generated `tsconfig.json` from `wrangler init`, particularly for compatibility around esbuild. - `target`, `module` and `lib` are set to `esnext`, since we're comfortable supporting that on cloudflare, and esbuild handles it just fine (for now) - `moduleResolution` is set to `node`, but of course - some useful fields set to true: `esModuleInterop`, `allowJs`, `allowSyntheticDefaultImports`, `resolveJsonModule` - `isolatedModules` set to true because esbuild can't handle anything else (folks can disable this if they;re using `tsc` themselves, but it's such a smaaaall group of people who do so - `noEmit` is `true`; we use esbuild to output code, and no one's using wrangler to generate `.d.ts` files (folks who have custom setups are welcome to do so) - `jsx: "react"` - I think this may be the default anyway, but it's good to be explicit if people want to change it I also pinned the version of miniflare (`^` doesn't work with non-semver versions anyway)
- Loading branch information
1 parent
9a0f6cf
commit 8b6c2d1
Showing
6 changed files
with
22 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"wrangler": patch | ||
--- | ||
|
||
Add more fields to the `tsconfig.json` generated by `wrangler init` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
{ | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode" | ||
] | ||
} | ||
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"] | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters