Skip to content

Commit

Permalink
fix: use tsc-alias to fix esm build (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
effervescentia authored Apr 26, 2024
1 parent 8437a2f commit b68f9b9
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 2 deletions.
39 changes: 39 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"[javascript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[javascriptreact]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[typescriptreact]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"eslint.format.enable": true,
"eslint.experimental.useFlatConfig": true,
"search.exclude": {
"**/node_modules": true,
"**/build": true,
"**/sonar": true,
"**/.husky": true,
"**/.yarn": true,
"**/.turbo": true
}
}
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"build:cjs": "yarn prebuild:cjs && yarn swc src -d build/cjs --config module.type=commonjs && yarn postbuild:cjs",
"postbuild:cjs": "touch build/cjs/package.json && echo '{ \"type\": \"commonjs\" }' > build/cjs/package.json",
"prebuild:esm": "yarn rimraf build/esm",
"build:esm": "yarn prebuild:esm && yarn swc src -d build/esm --config module.type=es6 && yarn postbuild:esm",
"build:esm": "yarn prebuild:esm && yarn swc src -d build/esm --config module.type=es6 && tsc-alias --outDir build/esm -p tsconfig.build.json && yarn postbuild:esm",
"postbuild:esm": "touch build/esm/package.json && echo '{ \"type\": \"module\" }' > build/esm/package.json",
"build:types": "yarn tsc -p tsconfig.build.json",
"test": "yarn jest --passWithNoTests",
Expand Down Expand Up @@ -89,7 +89,11 @@
"rxjs": "^7"
},
"packageManager": "[email protected]",
"engines": {
"node": ">=18"
},
"volta": {
"node": "18.18.0"
"node": "18.18.0",
"yarn": "3.4.1"
}
}

0 comments on commit b68f9b9

Please sign in to comment.