Skip to content

Commit

Permalink
Fix astro package entrypoint types (#55)
Browse files Browse the repository at this point in the history
Co-authored-by: feugy <[email protected]>
  • Loading branch information
MoustaphaDev and feugy authored Feb 14, 2024
1 parent bcad295 commit 91cce4f
Show file tree
Hide file tree
Showing 5 changed files with 337 additions and 9 deletions.
4 changes: 4 additions & 0 deletions apps/astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,9 @@
"@astrojs/sitemap": "^3.0.4",
"@vercel/speed-insights": "workspace:*",
"astro": "^4.1.2"
},
"devDependencies": {
"@astrojs/check": "^0.5.4",
"typescript": "^5.3.3"
}
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
},
"license": "Apache-2.0",
"scripts": {
"build": "pnpm -F @vercel/speed-insights build",
"prepare": "husky install",
"test": "pnpm -F @vercel/speed-insights test"
},
Expand Down
3 changes: 1 addition & 2 deletions packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
"require": "./dist/index.js"
},
"./astro": {
"import": "./dist/astro/index.astro",
"types": "./dist/astro/index.astro.tsx"
"import": "./dist/astro/component.ts"
},
"./next": {
"browser": "./dist/next/index.mjs",
Expand Down
3 changes: 3 additions & 0 deletions packages/web/src/astro/component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// @ts-expect-error typescript doesn't handle ./index.astro properly, but it's needed to generate types
// eslint-disable-next-line import/no-default-export, no-useless-rename -- Exporting everything doesn't yield the desired outcome
export { default as default } from './index.astro';
Loading

0 comments on commit 91cce4f

Please sign in to comment.