-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Lib/JS] Compile svix package for ESM and CommonJS (#1549)
Closes #1483 Compile the svix JavaScript package in `ESM` and `CommonJS` simultaneously. This should solve the issues with tree-shaking (since it can only be done when the package is compiled with ESM). Also keeps the CommonJS version for backwards compatibility. Tested this locally and all the usual imports (`import { EventTypeOut } from "svix"`) work as expected, with no changes whatsoever.
- Loading branch information
1 parent
9b6cf7c
commit 633015f
Showing
3 changed files
with
59 additions
and
12 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"compilerOptions": { | ||
"strict": true, | ||
/* Basic Options */ | ||
"target": "es6", | ||
"module": "ESNext", | ||
"moduleResolution": "node", | ||
"declaration": true, | ||
"allowJs": true, | ||
/* Additional Checks */ | ||
"noUnusedLocals": false /* Report errors on unused locals. */, // TODO: reenable (unused imports!) | ||
"noUnusedParameters": false /* Report errors on unused parameters. */, // TODO: set to true again | ||
"noImplicitReturns": true /* Report error when not all code paths in function return a value. */, | ||
"noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */, | ||
"removeComments": true, | ||
"sourceMap": true, | ||
"outDir": "./dist/esm", | ||
"noLib": false, | ||
"lib": [ | ||
"es6", | ||
"dom" | ||
] | ||
}, | ||
"exclude": [ | ||
"dist", | ||
"node_modules", | ||
"jest.config.js", | ||
"src/**/*.test.ts", | ||
], | ||
"filesGlob": [ | ||
"./src/**/*.ts" | ||
] | ||
} |