Skip to content

Commit

Permalink
fix: fix vike-react-query ESM build (fix #49)
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Dec 14, 2023
1 parent afd0ae3 commit 12ca0c3
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import React, { ReactNode, useState } from 'react'
import type { PageContext } from 'vike/types'
import { StreamedHydration } from './StreamedHydration'
import { StreamedHydration } from './StreamedHydration.js'

type VikeReactQueryWrapperProps = {
pageContext: PageContext
Expand Down
2 changes: 1 addition & 1 deletion packages/vike-react-query/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { withFallback } from './withFallback'
export { withFallback } from './withFallback.js'
2 changes: 1 addition & 1 deletion packages/vike-react-query/src/withFallback.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { cleanup, render, waitFor } from '@testing-library/react'
import React, { ReactNode, useEffect } from 'react'
import { afterEach, describe, expect, it, vi } from 'vitest'
import { withFallback } from './withFallback'
import { withFallback } from './withFallback.js'
import { QueryClient, QueryClientProvider, useSuspenseQuery } from '@tanstack/react-query'

const Component = withFallback(
Expand Down
28 changes: 17 additions & 11 deletions packages/vike-react-query/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
{
"compilerOptions": {
"jsx": "react",
"module": "ES2020",
"moduleResolution": "Node",
"target": "ES2019",
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"outDir": "./dist/",
// Resolution
"target": "ES2020",
"module": "Node16",
"moduleResolution": "Node16",
// Libs
"lib": ["ES2021", "DOM", "DOM.Iterable"],
"types": ["vite/client"],
"esModuleInterop": true,
"skipLibCheck": true,
"allowSyntheticDefaultImports": true,
"noUncheckedIndexedAccess": true,
// Strictness
"strict": true,
"noUncheckedIndexedAccess": true,
"noImplicitAny": true,
// Output
"declaration": true,
"outDir": "./dist/",
"rootDir": "."
"noEmitOnError": false,
"rootDir": "./",
// Misc
"esModuleInterop": true,
"skipLibCheck": true,
"jsx": "react"
}
}

0 comments on commit 12ca0c3

Please sign in to comment.