Skip to content

Commit

Permalink
fix: explicit module constraints (#672)
Browse files Browse the repository at this point in the history
* fix(tsconfig): explicit module constraints

These options are viral: enabling them in a package requires all downstream consumers to enable them as well.

Consumers can now opt into these semantics, it also does not require them to do so. Consumers can always safely use alternative import syntaxes (including falling back to `require() `and i`mport()`), or can enable these flags and opt into this behavior themselves.

* Create khaki-coats-cry.md

---------

Co-authored-by: jxom <[email protected]>
  • Loading branch information
sambacha and jxom authored Jun 11, 2023
1 parent fe259a0 commit e033f46
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/khaki-coats-cry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"viem": patch
---

Turned off `esModuleInterop` & `allowSyntheticDefaultImports` in tsconfig.
2 changes: 2 additions & 0 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"checkJs": false,

// Interop constraints
"esModuleInterop": false,
"allowSyntheticDefaultImports": false,
"forceConsistentCasingInFileNames": true,
"verbatimModuleSyntax": true,

Expand Down

1 comment on commit e033f46

@vercel
Copy link

@vercel vercel bot commented on e033f46 Jun 11, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.