Skip to content

Commit

Permalink
fix: support moduleResolution: node
Browse files Browse the repository at this point in the history
fix #578
  • Loading branch information
Xiphe committed Feb 16, 2024
1 parent 3604bbb commit ef1be3f
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 11 deletions.
4 changes: 2 additions & 2 deletions demo/tsconfig.json
Expand Up @@ -3,8 +3,8 @@
"compilerOptions": {
"noEmit": true,
"paths": {
"@oazapfts/runtime": ["../packages/runtime/dist"],
"@oazapfts/runtime/*": ["../packages/runtime/dist/*"]
"@oazapfts/runtime": ["../packages/runtime/src"],
"@oazapfts/runtime/*": ["../packages/runtime/src/*"]
}
},
"include": ["./*.ts"]
Expand Down
8 changes: 8 additions & 0 deletions packages/codegen/.gitignore
@@ -0,0 +1,8 @@
# dist is moved to root upon publish
*.cjs
*.cjs.map
*.js
*.js.map
*.d.ts

!typings.d.ts
2 changes: 1 addition & 1 deletion packages/codegen/.npmignore
@@ -1,5 +1,5 @@
src/
misc/
template/
vite.config.ts
tsconfig.json
typings.d.ts
Expand Down
3 changes: 2 additions & 1 deletion packages/codegen/package.json
Expand Up @@ -27,7 +27,8 @@
}
},
"scripts": {
"build": "rm -rf dist && tsc && vite build --mode esm && vite build --mode cjs && chmod +x dist/cli.js && chmod +x dist/cli.cjs"
"build": "rm -rf dist && tsc && vite build --mode esm && vite build --mode cjs && chmod +x dist/cli.js && chmod +x dist/cli.cjs",
"prepack": "sed -i 's|dist/||g' package.json && mv dist/* ."
},
"release": {
"extends": "semantic-release-monorepo",
Expand Down
8 changes: 2 additions & 6 deletions packages/codegen/src/index.test.ts
Expand Up @@ -29,12 +29,8 @@ async function checkForTypeErrors(source: string) {
noEmit: true,
target: ScriptTarget.ESNext,
paths: {
"@oazapfts/runtime": [
path.resolve(__dirname, "../../packages/runtime/dist"),
],
"@oazapfts/runtime/*": [
path.join(__dirname, "../../packages/runtime/dist/*"),
],
"@oazapfts/runtime": [path.resolve(__dirname, "../../runtime/src")],
"@oazapfts/runtime/*": [path.join(__dirname, "../../runtime/src/*")],
},
},
});
Expand Down
8 changes: 8 additions & 0 deletions packages/runtime/.gitignore
@@ -0,0 +1,8 @@
# dist is moved to root upon publish
*.cjs
*.cjs.map
*.js
*.js.map
*.d.ts

!typings.d.ts
3 changes: 2 additions & 1 deletion packages/runtime/package.json
Expand Up @@ -34,7 +34,8 @@
"directory": "packages/runtime"
},
"scripts": {
"build": "rm -rf dist && tsc && vite build --mode esm && vite build --mode cjs"
"build": "rm -rf dist && tsc && vite build --mode esm && vite build --mode cjs",
"prepack": "sed -i 's|dist/||g' package.json && mv dist/* ."
},
"release": {
"extends": "semantic-release-monorepo",
Expand Down

0 comments on commit ef1be3f

Please sign in to comment.