Turbopack replacement for Webpack’s `config.resolve.fallback`
Unanswered
Western paper wasp posted this in #help-forum
Western paper waspOP
I import several packages into my client bundle that contain conditional imports of node-only packages. For example:
-
- I use type-only imports from Prisma on the client
With Webpack, I could set:
in order to prevent
How can I accomplish this in Turbopack?
-
pathkit-wasm uses a standard Emscripten entrypoint, which requires fs only when Node is detected. - I use type-only imports from Prisma on the client
With Webpack, I could set:
if (!isServer) config.resolve.fallback = { fs: false };in order to prevent
fs imports from erroring on the client so long as they are unused.How can I accomplish this in Turbopack?