Skip to content

Commit

Permalink
ci: use tspc to resolve aliases for dist types
Browse files Browse the repository at this point in the history
  • Loading branch information
HeartSquared committed Apr 8, 2024
1 parent 664e530 commit 855ea29
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"clean": "rimraf dist",
"build:components": "rollup -c && pnpm build:types",
"build:styles": "postcss styles/global.css --output dist/global.css",
"build:types": "tsc --project tsconfig.types.json",
"build:types": "tspc --project tsconfig.types.json",
"compile": "tsc",
"dist:clean": "rm ./dist/global.css ./dist/raw-styles.css",
"dist:combine-styles": "concat-cli -f ./dist/*.css -o ./dist/raw-styles.css",
Expand Down
3 changes: 0 additions & 3 deletions packages/components/tsconfig.dist.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@
"moduleResolution": "node",
"declaration": false,
"noEmit": false,
// Note: To transform paths for both the output .js and .d.ts files, you need both of the below entries
"plugins": [
// Transform paths in output .js files
{ "transform": "typescript-transform-paths" },
// Transform paths in output .d.ts files (Include this line if you output declarations files)
{ "transform": "typescript-transform-paths", "afterDeclarations": true }
]
},
"exclude": [
Expand Down
8 changes: 6 additions & 2 deletions packages/components/tsconfig.types.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
"compilerOptions": {
"declaration": true,
"declarationDir": "dist/types",
"emitDeclarationOnly": true
}
"emitDeclarationOnly": true,
"plugins": [
// Transform paths in output .d.ts files (Include this line if you output declarations files)
{ "transform": "typescript-transform-paths", "afterDeclarations": true },
]
},
}

0 comments on commit 855ea29

Please sign in to comment.