Skip to content

Commit

Permalink
use tsc-alias to rewrite imports
Browse files Browse the repository at this point in the history
  • Loading branch information
AmitPr committed Jun 26, 2024
1 parent 3ff58b5 commit e7798a5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
Binary file modified bun.lockb
Binary file not shown.
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,18 @@
"module": "dist/src/index.js",
"devDependencies": {
"@types/bun": "latest",
"cosmes": "git+https://github.com/AmitPr/cosmes.git"
"cosmes": "git+https://github.com/AmitPr/cosmes.git",
"tsc-alias": "1.8.10"
},
"peerDependencies": {
"typescript": "^5.0.0",
"type-fest": "^4.20.0"
},
"scripts": {
"build": "tsc",
"build": "rm -rf dist && tsc && tsc-alias",
"tag": "npm version patch && git push --tags"
},
"files": [
"dist/**/*"
]
}
}
10 changes: 7 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
// Enable latest features
"lib": ["ESNext", "DOM"],
"target": "ESNext",
"module": "CommonJS",
"module": "ESNext",
"moduleDetection": "force",
"allowJs": true,

// Bundler mode
"moduleResolution": "Node",
"moduleResolution": "bundler",
// codegen doesn't do "import type", so disable:
"verbatimModuleSyntax": false,

Expand All @@ -33,5 +33,9 @@
"esModuleInterop": true
},
"include": ["src/**/*", "scripts/**/*"],
"exclude": ["scripts/**/*"]
"exclude": ["scripts/**/*"],
"tsc-alias": {
"resolveFullPaths": true,
"verbose": false
}
}

0 comments on commit e7798a5

Please sign in to comment.