We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi. I'm trying to use vite-plugin-relay on a project that uses src as the root, and uses tsconfig paths for absolute imports.
vite-plugin-relay
src
import react from "@vitejs/plugin-react" import tsconfigPaths from "vite-tsconfig-paths" import { defineConfig } from "vitest/config" import relay from "vite-plugin-relay" // https://vitejs.dev/config/ export default defineConfig({ plugins: [react(), tsconfigPaths(), relay], test: { globals: true, environment: "jsdom", setupFiles: ["./__tests__/setupVitestTests.ts"] }, root: "src", })
module.exports = { src: "./src", schema: "./schema.graphql", schemaExtensions: ["./src"], exclude: [ "**/__generated__/**", "**/__mocks__/**", "**/node_modules/**", "src/.next/**", ], language: "typescript", eagerEsModules: true, artifactDirectory: "./src/lib/graphql/__generated__", }
"paths": { "@/*": ["./*"] }
import { CollectionWatchlistButtonTestQuery } from "@/lib/graphql/__generated__/CollectionWatchlistButtonTestQuery.graphql"
When trying to run tests, vitest fails to find generated modules:
The text was updated successfully, but these errors were encountered:
Any solution? Same here
Sorry, something went wrong.
No branches or pull requests
Hi. I'm trying to use
vite-plugin-relay
on a project that usessrc
as the root, and uses tsconfig paths for absolute imports.vitest.config.ts
relay.config.js
tsconfig paths:
Imports:
When trying to run tests, vitest fails to find generated modules:
The text was updated successfully, but these errors were encountered: