Skip to content

Commit

Permalink
feat(database-drivers): Nuxt + Wasm workaround (#6054)
Browse files Browse the repository at this point in the history
Co-authored-by: Jon Harrell <4829245+jharrell@users.noreply.github.com>
Co-authored-by: carlagn <goncalves@prisma.io>
  • Loading branch information
3 people authored Jun 12, 2024
1 parent 9eadc89 commit 58c11ba
Showing 1 changed file with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,24 @@ import { PrismaClient } from 'db'

const client = new PrismaClient()
```

### Driver adapters and specific frameworks

#### Nuxt

Using a driver adapter with [Nuxt](https://nuxt.com/) to deploy to an edge function environment does not work out of the box, but adding the `nitro.experimental.wasm` configuration option fixes that:

```ts
export default defineNuxtConfig({
// ...
nitro: {
// ...
experimental: {
wasm: true,
},
},
// ...
})
```

See [this example project](https://github.com/prisma/ecosystem-tests/tree/dev/driver-adapters-wasm/d1-cfpages-nuxt) for a full example that can be deployed to Cloudflare Pages.

0 comments on commit 58c11ba

Please sign in to comment.