Skip to content

Commit

Permalink
fix: declare modules as esm by default
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub committed Mar 17, 2023
1 parent bba7511 commit 21d61b4
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 15 deletions.
9 changes: 5 additions & 4 deletions packages/abstract/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@
"exports": {
".": {
"import": "./target/esm/index.js",
"require": "./target/cjs/index.js",
"require": "./target/cjs/index.cjs",
"types": "./target/esm/index.d.ts"
}
},
"main": "./target/cjs/index.js",
"type": "module",
"main": "./target/cjs/index.cjs",
"module": "./target/esm/index.js",
"types": "./target/esm/index.d.ts",
"scripts": {
"clean": "rimraf target buildcache docs coverage buildstamp.json",
"build": "yarn aliasgen && concurrently 'npm:build:*'",
"build:cjs": "mkdirp target/cjs && tsc -p tsconfig.json --target ES5 --module commonjs --outDir target/cjs --tsBuildInfoFile buildcache/cjs.json",
"build:esm": "mkdirp target/esm && tsc -p tsconfig.json --target ES2020 --module es2020 --outDir target/esm --tsBuildInfoFile buildcache/esm.json && tsc-esm-fix --target=target/esm",
"build:cjs": "mkdirp target/cjs && tsc -p tsconfig.json --target ES5 --module commonjs --outDir target/cjs --tsBuildInfoFile buildcache/cjs.json && tsc-esm-fix --target=target/esm --ext=.cjs",
"build:esm": "mkdirp target/esm && tsc -p tsconfig.json --target ES2020 --module es2020 --outDir target/esm --tsBuildInfoFile buildcache/esm.json",
"build:ts": "mkdirp target/ts && cp -R ./src/main/ts/. ./target/ts/.",
"build:stamp": "buildstamp --git --out.path buildstamp.json",
"build:docs": "typedoc",
Expand Down
9 changes: 5 additions & 4 deletions packages/facade/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,19 @@
"exports": {
".": {
"import": "./target/esm/index.js",
"require": "./target/cjs/index.js",
"require": "./target/cjs/index.cjs",
"types": "./target/esm/index.d.ts"
}
},
"main": "./target/cjs/index.js",
"type": "module",
"main": "./target/cjs/index.cjs",
"module": "./target/esm/index.js",
"types": "./target/esm/index.d.ts",
"scripts": {
"clean": "rimraf target buildcache docs coverage buildstamp.json",
"build": "concurrently 'npm:build:*'",
"build:cjs": "mkdirp target/cjs && tsc -p tsconfig.json --target ES5 --module commonjs --outDir target/cjs --tsBuildInfoFile buildcache/cjs.json",
"build:esm": "mkdirp target/esm && tsc -p tsconfig.json --target ES2020 --module es2020 --outDir target/esm --tsBuildInfoFile buildcache/esm.json && tsc-esm-fix --target=target/esm",
"build:cjs": "mkdirp target/cjs && tsc -p tsconfig.json --target ES5 --module commonjs --outDir target/cjs --tsBuildInfoFile buildcache/cjs.json && tsc-esm-fix --target=target/esm --ext=.cjs",
"build:esm": "mkdirp target/esm && tsc -p tsconfig.json --target ES2020 --module es2020 --outDir target/esm --tsBuildInfoFile buildcache/esm.json",
"build:ts": "mkdirp target/ts && cp -R ./src/main/ts/. ./target/ts/.",
"build:stamp": "buildstamp --git --out.path buildstamp.json",
"build:test": "rsync -a ../types/src/test/dts/I*.ts ./src/test/dts/ && rsync -a ../abstract/src/test/ts/*.ts ./src/test/ts/ && rsync -a ../std/src/test/ts/*.ts ./src/test/ts/",
Expand Down
7 changes: 4 additions & 3 deletions packages/std/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,19 @@
"exports": {
".": {
"import": "./target/esm/index.js",
"require": "./target/cjs/index.js",
"require": "./target/cjs/index.cjs",
"types": "./target/esm/index.d.ts"
}
},
"type": "module",
"main": "./target/cjs/index.js",
"module": "./target/esm/index.js",
"types": "./target/esm/index.d.ts",
"scripts": {
"clean": "rimraf target buildcache flow-typed typings docs coverage buildstamp.json",
"build": "concurrently 'npm:build:*'",
"build:cjs": "mkdirp target/cjs && tsc -p tsconfig.json --target ES5 --module commonjs --outDir target/cjs --tsBuildInfoFile buildcache/cjs.json",
"build:esm": "mkdirp target/esm && tsc -p tsconfig.json --target ES2020 --module es2020 --outDir target/esm --tsBuildInfoFile buildcache/esm.json && tsc-esm-fix --target=target/esm",
"build:cjs": "mkdirp target/cjs && tsc -p tsconfig.json --target ES5 --module commonjs --outDir target/cjs --tsBuildInfoFile buildcache/cjs.json && tsc-esm-fix --target=target/esm --ext=.cjs",
"build:esm": "mkdirp target/esm && tsc -p tsconfig.json --target ES2020 --module es2020 --outDir target/esm --tsBuildInfoFile buildcache/esm.json",
"build:ts": "mkdirp target/ts && cp -R ./src/main/ts/. ./target/ts/.",
"build:stamp": "buildstamp --git --out.path buildstamp.json",
"build:docs": "typedoc",
Expand Down
9 changes: 5 additions & 4 deletions packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,19 @@
"exports": {
".": {
"import": "./target/esm/index.js",
"require": "./target/cjs/index.js",
"require": "./target/cjs/index.cjs",
"types": "./target/esm/index.d.ts"
}
},
"main": "./target/cjs/index.js",
"type": "module",
"main": "./target/cjs/index.cjs",
"module": "./target/esm/index.js",
"types": "./target/esm/index.d.ts",
"scripts": {
"clean": "rimraf target buildcache flow-typed typings docs coverage buildstamp.json",
"build": "yarn aliasgen && concurrently 'npm:build:*'",
"build:cjs": "mkdirp target/cjs && tsc -p tsconfig.json --target ES5 --module commonjs --outDir target/cjs --tsBuildInfoFile buildcache/cjs.json",
"build:esm": "mkdirp target/esm && tsc -p tsconfig.json --target ES2020 --module es2020 --outDir target/esm --tsBuildInfoFile buildcache/esm.json && tsc-esm-fix --target=target/esm",
"build:cjs": "mkdirp target/cjs && tsc -p tsconfig.json --target ES5 --module commonjs --outDir target/cjs --tsBuildInfoFile buildcache/cjs.json && tsc-esm-fix --target=target/esm --ext=.cjs",
"build:esm": "mkdirp target/esm && tsc -p tsconfig.json --target ES2020 --module es2020 --outDir target/esm --tsBuildInfoFile buildcache/esm.json",
"build:ts": "mkdirp target/ts && cp -R ./src/main/ts/. ./target/ts/.",
"build:stamp": "buildstamp --git --out.path buildstamp.json",
"build:docs": "typedoc",
Expand Down

0 comments on commit 21d61b4

Please sign in to comment.