Skip to content

Commit

Permalink
Target ES2015 and duplicate typings in CommonJS build (gnosis/gp-v2-c…
Browse files Browse the repository at this point in the history
…ontracts#685)

This PR changes the ESM build to target ES2015 for better compatibility with `create-react-app`. Additionally, typings are included in the CommonJS build (they are duplicated from the typings in the `lib/esm` directory, but it does greatly simplify using the CommonJS modules directly without increasing package size too much).

The package version was also bumped in order to prep for a new release.
  • Loading branch information
nlordell authored Jun 10, 2021
1 parent 3f813f2 commit 74eec7f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gnosis.pm/gp-v2-contracts",
"version": "1.0.0",
"version": "1.0.1",
"license": "LGPL-3.0-or-later",
"scripts": {
"deploy": "hardhat deploy",
Expand Down
3 changes: 1 addition & 2 deletions tsconfig.lib.commonjs.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"outDir": "lib/commonjs/",
"declaration": false
"outDir": "lib/commonjs/"
}
}
4 changes: 2 additions & 2 deletions tsconfig.lib.esm.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"target": "es2020",
"module": "es2020",
"target": "es2015",
"module": "es2015",
"outDir": "lib/esm/",
"declaration": true,
"sourceMap": true,
Expand Down

0 comments on commit 74eec7f

Please sign in to comment.