Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix astro package entrypoint types #55

Merged
merged 3 commits into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading