Skip to content

Commit 6f5d6f5

Browse files
committed
use .cjs and .mjs file extensions
1 parent 373b796 commit 6f5d6f5

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"name": "hash-wasm",
33
"version": "4.12.0",
44
"description": "Lightning fast hash functions for browsers and Node.js using hand-tuned WebAssembly binaries (MD4, MD5, SHA-1, SHA-2, SHA-3, Keccak, BLAKE2, BLAKE3, PBKDF2, Argon2, bcrypt, scrypt, Adler-32, CRC32, CRC32C, RIPEMD-160, HMAC, xxHash, SM3, Whirlpool)",
5-
"main": "dist/index.umd.js",
6-
"module": "dist/index.esm.js",
5+
"main": "dist/index.cjs",
6+
"module": "dist/index.mjs",
77
"types": "dist/lib/index.d.ts",
88
"scripts": {
99
"build": "sh -c ./scripts/build.sh",

rollup.config.mjs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ const MAIN_BUNDLE_CONFIG = {
5353
input: "lib/index.ts",
5454
output: [
5555
{
56-
file: "dist/index.umd.js",
56+
file: "dist/index.cjs",
5757
name: "hashwasm",
5858
format: "umd",
5959
},
6060
{
61-
file: "dist/index.esm.js",
61+
file: "dist/index.mjs",
6262
format: "es",
6363
},
6464
],
@@ -69,12 +69,12 @@ const MINIFIED_MAIN_BUNDLE_CONFIG = {
6969
input: "lib/index.ts",
7070
output: [
7171
{
72-
file: "dist/index.umd.min.js",
72+
file: "dist/index.min.cjs",
7373
name: "hashwasm",
7474
format: "umd",
7575
},
7676
{
77-
file: "dist/index.esm.min.js",
77+
file: "dist/index.min.mjs",
7878
format: "es",
7979
},
8080
],
@@ -90,7 +90,7 @@ const INDIVIDUAL_BUNDLE_CONFIG = (algorithm) => ({
9090
input: `lib/${algorithm}.ts`,
9191
output: [
9292
{
93-
file: `dist/${algorithm}.umd.min.js`,
93+
file: `dist/${algorithm}.min.cjs`,
9494
name: "hashwasm",
9595
format: "umd",
9696
extend: true,

0 commit comments

Comments
 (0)