Skip to content

Commit d8cf9db

Browse files
committed
build: Add "type" and "exports" to package.json
Update test module paths for "type": "module" in package.json
1 parent e7e33fc commit d8cf9db

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

package.json

+9-3
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,22 @@
33
"version": "0.0.2",
44
"description": "ZSTD (Zstandard) decoder for Web and Node.js, using WebAssembly",
55
"repository": "github:donmccurdy/zstddec",
6-
"main": "dist/zstddec.js",
6+
"type": "module",
7+
"exports": {
8+
"types": "dist/zstddec.d.ts",
9+
"require": "./dist/zstddec.cjs",
10+
"default": "./dist/zstddec.modern.js"
11+
},
12+
"main": "dist/zstddec.cjs",
713
"module": "dist/zstddec.modern.js",
814
"source": "zstddec.ts",
915
"types": "dist/zstddec.d.ts",
1016
"scripts": {
1117
"dist": "microbundle --format modern,cjs",
1218
"watch": "microbundle watch --format modern,cjs",
1319
"test": "npm run test:node && npm run test:browser",
14-
"test:node": "tape *.test.js | tap-spec",
15-
"test:browser": "browserify *.test.js | tape-run | tap-spec",
20+
"test:node": "tape *.test.cjs | tap-spec",
21+
"test:browser": "browserify *.test.cjs | tape-run | tap-spec",
1622
"preversion": "npm run dist && npm run test",
1723
"postversion": "git push && git push --tags && npm publish"
1824
},
File renamed without changes.

0 commit comments

Comments
 (0)