-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build lib with different options (gnosis/gp-v2-contracts#508)
Closes #506 This PR adds additional TypeScript configuration files for targeting both CommonJS and ES modules. Additionally, it produces `es5` output in order to be more compatible with the FE. Additionally, and ESM build is included so that it can work better with tools like Babel and take better advantage of things like tree shaking to reduce bundle sizes. ### Test Plan Deploy this package and make sure it works with the FE.
- Loading branch information
Showing
4 changed files
with
37 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
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,13 +1,12 @@ | ||
{ | ||
"compilerOptions": { | ||
"declaration": true, | ||
"esModuleInterop": true, | ||
"target": "es2020", | ||
"module": "commonjs", | ||
"moduleResolution": "node", | ||
"outDir": "lib", | ||
"resolveJsonModule": true, | ||
"skipLibCheck": true, | ||
"noEmit": true, | ||
"strict": true, | ||
"target": "es2020" | ||
"esModuleInterop": true, | ||
"resolveJsonModule": true, | ||
"skipLibCheck": true | ||
} | ||
} |
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,9 @@ | ||
{ | ||
"extends": "./tsconfig.lib.esm.json", | ||
"compilerOptions": { | ||
"target": "es5", | ||
"module": "commonjs", | ||
"outDir": "lib/commonjs/", | ||
"declaration": false | ||
} | ||
} |
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,13 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"target": "es2020", | ||
"module": "es2020", | ||
"outDir": "lib/esm/", | ||
"declaration": true, | ||
"sourceMap": true, | ||
"rootDir": "src/ts/", | ||
"noEmit": false | ||
}, | ||
"include": ["src/ts/**/*"] | ||
} |