Merge pull request #29 from jwetzell/esm-and-cjs

add support for bundling both esm and cjs versions
This commit is contained in:
2024-10-25 09:15:48 -05:00
committed by GitHub
9 changed files with 49 additions and 14 deletions
+14 -3
View File
@@ -2,11 +2,22 @@
"name": "@jwetzell/osc",
"version": "1.5.0",
"description": "",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
"types": "./dist/types/index.d.ts",
"exports": {
".": {
"import": "./dist/esm/index.js",
"require": "./dist/cjs/index.js",
"types": "./dist/types/index.d.ts"
}
},
"scripts": {
"prebuild": "rimraf dist",
"build": "tsc",
"build": "npm run build:cjs && npm run build:esm && npm run build:types",
"build:cjs": "tsc -p tsconfig.cjs.json",
"build:esm": "tsc -p tsconfig.esm.json",
"build:types": "tsc -p tsconfig.types.json",
"prepublishOnly": "npm run build",
"pretest": "npm run build",
"test": "node --test --experimental-test-coverage"