Skip to content

Commit

Permalink
add docs for bundlers
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolasburk committed Feb 17, 2020
1 parent a98094e commit 1081843
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/prisma-client-js/usage-with-bundlers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Usage with module bundlers

_Module bundlers_ bundle JavaScript modules into a single JavaScript file. Most bundlers work by copying over the JavaScript code from a variety of source files into the target file.

Since Prisma Client JS is not only based on JavaScript code, but also relies on the **query engine binary** to be available, you need to make sure that your bundled code has access to the binary.

To do so, you can use plugins that let you copy over static assets:

| Bundler | Plugin |
| :-- | :-- |
| Webpack | [`copy-webpack-plugin`](https://github.com/webpack-contrib/copy-webpack-plugin#copy-webpack-plugin) |
| Parcel | [`parcel-plugin-static-files-copy`](https://github.com/elwin013/parcel-plugin-static-files-copy#readme) |

0 comments on commit 1081843

Please sign in to comment.