diff --git a/app.config.ts b/app.config.ts index 387863df..8605b488 100644 --- a/app.config.ts +++ b/app.config.ts @@ -6,13 +6,14 @@ import sassDts from 'vite-plugin-sass-dts' const isVercel = Boolean(process?.env.VERCEL) const isBun = Boolean(process.env.BUN) +const isE2E = Boolean(process.env.E2E) export default defineConfig({ ssr: true, server: { preset: isVercel ? 'vercel_edge' : isBun ? 'bun' : 'node', port: 3000, - https: !isVercel + https: isE2E }, devOverlay: true, build: { diff --git a/package.json b/package.json index 5e9f2661..6a4b9e49 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "build": "vinxi build", "start": "vinxi start", "codegen": "graphql-codegen", - "e2e": "npm run e2e:tests", + "e2e": "E2E=1 npm run e2e:tests", "e2e:tests": "npx playwright test --project=webkit", "e2e:tests:ci": "CI=true npx playwright test --project=webkit", "e2e:install": "npx playwright install webkit && npx playwright install-deps ", diff --git a/src/routes/author/[slug]/[...tab].tsx b/src/routes/author/[slug]/[...tab].tsx index 43f996a8..e14a275a 100644 --- a/src/routes/author/[slug]/[...tab].tsx +++ b/src/routes/author/[slug]/[...tab].tsx @@ -49,7 +49,7 @@ export const route = { export type AuthorPageProps = { articles?: Shout[]; author?: Author; topics?: Topic[] } -export const AuthorPage = (props: RouteSectionProps) => { +export default function AuthorPage(props: RouteSectionProps) { const { addAuthor } = useAuthors() const articles = createAsync( async () => props.data.articles || (await fetchAuthorShouts(props.params.slug)) || [] @@ -107,5 +107,3 @@ export const AuthorPage = (props: RouteSectionProps) => { ) } - -export default AuthorPage