Skip to content

Commit

Permalink
add ESM build for common
Browse files Browse the repository at this point in the history
  • Loading branch information
rezonant committed May 23, 2020
1 parent 60e4a50 commit e85f5b0
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 6 deletions.
13 changes: 10 additions & 3 deletions packages/common/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
},
"description": "",
"main": "./dist/index.js",
"module": "./dist.esm/index.js",
"typings": "./dist/index.d.ts",
"scripts": {
"build": "tsc -p .",
"build:esm": "tsc -p tsconfig.esm.json",
"prepare": "npm run test",
"test": "npm run build && node dist/test.js"
},
Expand Down
15 changes: 15 additions & 0 deletions packages/common/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"extends": "../../tsconfig.esm.json",
"compilerOptions": {
"baseUrl": "./src",
"outDir": "./dist.esm",
"typeRoots": [
"./node_modules/@types",
"./node_modules"
],
"types": [
"node"
]
},
"include": [ "./src/**/*.ts" ]
}
5 changes: 2 additions & 3 deletions tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"target": "es2016",
"module": "es6",
"outDir": "dist.esm"
"target": "ES2016",
"module": "ES2015",
}
}

0 comments on commit e85f5b0

Please sign in to comment.