Skip to content

Commit 482d339

Browse files
committed
Change exports. (main: UMD/ES2017, module: ESM/ES2017)
1 parent b8a5137 commit 482d339

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"license": "MIT",
77
"repository": "github:github/webauthn-json",
88
"main": "dist/index.js",
9+
"module": "dist/index.esm.js",
910
"umd": "dist/webauthn-json.umd.js",
1011
"types": "dist/src/index.d.ts",
1112
"dependencies": {
@@ -31,8 +32,8 @@
3132
"print-schemas": "npx ts-node script/print-schemas.ts",
3233
"lint": "tslint --fix --project . && tslint --fix rollup.config.js",
3334
"prepack": "npm run clean && npm run build",
34-
"copy-flow": "mkdir -p dist/ && rm -f dist/index.js.flow && cp src/index.js.flow dist/",
35-
"link-flow": "mkdir -p dist/ && rm -f dist/index.js.flow && ln -s src/index.js.flow dist/"
35+
"copy-flow": "mkdir -p dist/ && rm -f dist/index.js.flow dist/index.esm.js.flow && cp src/index.js.flow dist/ && cp src/index.js.flow dist/index.esm.js.flow",
36+
"link-flow": "mkdir -p dist/ && rm -f dist/index.js.flow dist/index.esm.js.flow && ln -s src/index.js.flow dist/ && ln -s src/index.js.flow dist/index.esm.js.flow"
3637
},
3738
"keywords": [
3839
"webauthn",

rollup.config.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ export default {
99
output: [
1010
{
1111
file: pkg.main,
12-
format: "cjs",
12+
format: "umd",
13+
name: "webauthnJSON",
1314
sourcemap: true,
1415
},
1516
{
16-
file: pkg.umd,
17-
format: "umd",
18-
name: "webauthnJSON",
17+
file: pkg.module,
18+
format: "esm",
1919
sourcemap: true,
2020
},
2121
],

tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"outDir": "dist",
1313
"sourceMap": true,
1414
"strictNullChecks": true,
15-
"target": "es6"
15+
"target": "es2017"
1616
},
1717
"include": [
1818
"src/**/*",

0 commit comments

Comments
 (0)