Skip to content

Commit c1a9da7

Browse files
authored
Add esnext build (#4)
1 parent 5d58f4c commit c1a9da7

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@
88
},
99
"author": "Microsoft",
1010
"license": "MIT",
11-
"main": "lib/index.js",
12-
"types": "lib/index.d.ts",
11+
"main": "lib/csj/index.js",
12+
"module": "lib/esm/index.js",
13+
"types": "lib/csj/index.d.ts",
1314
"sideEffects": false,
1415
"scripts": {
1516
"clean": "rimraf ./lib ./coverage",
1617
"prebuild": "npm run clean",
17-
"build": "tsc",
18+
"build": "tsc && tsc -p tsconfig.esm.json",
1819
"test": "nyc jasmine --config=jasmine.json",
1920
"prepublishOnly": "npm run build && npm run test"
2021
},

tsconfig.esm.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"module": "esnext",
5+
"outDir": "./lib/esm",
6+
},
7+
"exclude": [
8+
"src/**/*.spec.ts"
9+
]
10+
}

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"module": "commonjs",
55
"forceConsistentCasingInFileNames": true,
66
"rootDir": "src",
7-
"outDir": "lib",
7+
"outDir": "lib/cjs",
88
"declaration": true,
99
"sourceMap": true,
1010
"removeComments": true,

0 commit comments

Comments
 (0)