filerouter-import-workaround

This commit is contained in:
Untone 2024-07-13 12:45:10 +03:00
parent fde2335a02
commit 17d2600142
3 changed files with 4 additions and 5 deletions

View File

@ -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: {

View File

@ -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 ",

View File

@ -49,7 +49,7 @@ export const route = {
export type AuthorPageProps = { articles?: Shout[]; author?: Author; topics?: Topic[] }
export const AuthorPage = (props: RouteSectionProps<AuthorPageProps>) => {
export default function AuthorPage(props: RouteSectionProps<AuthorPageProps>) {
const { addAuthor } = useAuthors()
const articles = createAsync(
async () => props.data.articles || (await fetchAuthorShouts(props.params.slug)) || []
@ -107,5 +107,3 @@ export const AuthorPage = (props: RouteSectionProps<AuthorPageProps>) => {
</ErrorBoundary>
)
}
export default AuthorPage