prisma-webpack-plugin
v0.1.1
Published
use prisma to migrate database when webpack working
Downloads
4
Readme
prisma-webpack-plugin
generate code from prisma files before webpack compiling after you changed you prisma schema.
Getting Started
$ npm install prisma-webpack-plugin --save-dev
Example
in webpack.config.js
const PrismaPlugin = require('prisma-webpack-plugin');
module.exports = {
// ...
plugins: [
new PrismaPlugin({
prisma: path.join(__dirname, './prisma/schema.prisma')
})
]
};
You can use import { PrismaClient } from '@prisma/client';
in your code.