add esm tsconfig
This commit is contained in:
parent
f8da1f6a40
commit
91b2e770e6
|
@ -9,14 +9,16 @@
|
||||||
"url": "https://blockworks.foundation"
|
"url": "https://blockworks.foundation"
|
||||||
},
|
},
|
||||||
"main": "dist/cjs/src/index.js",
|
"main": "dist/cjs/src/index.js",
|
||||||
|
"module": "dist/esm/src/index.js",
|
||||||
"types": "dist/types/src/index.d.ts",
|
"types": "dist/types/src/index.d.ts",
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
"files": [
|
"files": [
|
||||||
"dist"
|
"dist"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "npm run build:cjs",
|
"build": "npm run build:esm; npm run build:cjs",
|
||||||
"build:cjs": "tsc -p tsconfig.cjs.json",
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
||||||
|
"build:esm": "tsc -p tsconfig.esm.json",
|
||||||
"clean": "rm -rf dist",
|
"clean": "rm -rf dist",
|
||||||
"example1-user": "ts-node ts/client/src/scripts/example1-user.ts",
|
"example1-user": "ts-node ts/client/src/scripts/example1-user.ts",
|
||||||
"example1-admin": "ts-node ts/client/src/scripts/example1-admin.ts",
|
"example1-admin": "ts-node ts/client/src/scripts/example1-admin.ts",
|
||||||
|
@ -24,7 +26,6 @@
|
||||||
"format": "prettier --check .",
|
"format": "prettier --check .",
|
||||||
"lint": "eslint . --ext ts --ext tsx --ext js --quiet",
|
"lint": "eslint . --ext ts --ext tsx --ext js --quiet",
|
||||||
"typecheck": "tsc --noEmit --pretty",
|
"typecheck": "tsc --noEmit --pretty",
|
||||||
"prepare": "yarn build",
|
|
||||||
"prebuild": "npm run clean",
|
"prebuild": "npm run clean",
|
||||||
"prepublishOnly": "npm run validate && npm run build",
|
"prepublishOnly": "npm run validate && npm run build",
|
||||||
"validate": "npm run typecheck && npm run test && npm run lint && npm run format-check"
|
"validate": "npm run typecheck && npm run test && npm run lint && npm run format-check"
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"extends": "./tsconfig.build",
|
||||||
|
"compilerOptions": {
|
||||||
|
"declaration": true,
|
||||||
|
"declarationDir": "dist/types",
|
||||||
|
"module": "esnext",
|
||||||
|
"outDir": "dist/esm"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue