Skip to content

Commit

Permalink
fix(package.json): use .mjs wrappers strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
jeff-tbd committed Nov 6, 2023
1 parent dd7085d commit c304c02
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,27 @@
"name": "@channel.io/channel-web-sdk-loader",
"version": "1.1.2",
"description": "Official Channel Web SDK Loader",
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
"types": "dist/index.d.ts",
"exports": {
".": {
"import": "./dist/index.esm.js",
"require": "./dist/index.cjs.js",
"types": "./dist/index.d.ts"
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.esm.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.cjs.js"
}
}
},
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
"types": "dist/index.d.ts",
"sideEffects": false,
"scripts": {
"prepublishOnly": "npm run build",
"build": "npm run build:cjs && npm run build:esm",
"build": "npm run build:esm && npm run build:cjs",
"build:esm": "tsc -p tsconfig.esm.json && mv dist/index.js dist/index.esm.js && mv dist/index.d.ts dist/index.d.mts && cp dist/index.esm.js dist/index.esm.mjs",
"build:cjs": "tsc -p tsconfig.cjs.json && mv dist/index.js dist/index.cjs.js",
"build:esm": "tsc -p tsconfig.esm.json && mv dist/index.js dist/index.esm.js",
"test": "echo \"Error: no test specified\" && exit 1",
"commit": "git-cz",
"build:typedoc": "typedoc src/index.ts"
Expand Down

0 comments on commit c304c02

Please sign in to comment.