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
I added below after above screenshot appears.
deps: { inline: [ "nexus-prisma" ] }
Then the result becomes
FAIL tests/api.test.ts [ tests/api.test.ts ] Error: Failed to load url .nexus-prisma (resolved id: .nexus-prisma) in /Users/node_modules/nexus-prisma/dist-esm/entrypoints/main.js. Does the file exist? ❯ loadAndTransform node_modules/vite/dist/node/chunks/dep-79892de8.js:41096:21
Any idea how to resolve this 🤔?
The text was updated successfully, but these errors were encountered:
We had a similar issue. As a workaround we've added a custom script that creates a "bridge" in betwen esm and cjs code.
esm
cjs
import { mkdirSync, writeFileSync } from "fs" import nexusPrisma from "nexus-prisma" import { fileURLToPath } from "url" const index = Object.keys(nexusPrisma) .map((key) => `export const ${key} = nexusPrisma.${key}`) .join("\n") const root = new URL("nexus/", import.meta.url) mkdirSync(fileURLToPath(root), { recursive: true }) writeFileSync( fileURLToPath(new URL(`./index.ts`, root)), [`import nexusPrisma from "nexus-prisma"`, index].join("\n"), )
I've also added a path alias to @/nexus and only imported from there. It's not ideal, but it helps for the transitioning phase.
@/nexus
Sorry, something went wrong.
No branches or pull requests
I added below after above screenshot appears.
Then the result becomes
Any idea how to resolve this 🤔?
The text was updated successfully, but these errors were encountered: