Making Prisma Client on Browser
Change on node_modules/prettier/index.js
-
import { inspect } from 'util'; //line: 2 add this to top of file
-
// var utilInspect = eval(
require('util').inspect
); //line: 40636 change with var utilInspect = inspect; -
// var prettier = src; // module.exports = prettier; //line: 42448 change with export const prettier = src;
Change on node_modules/prisma-client-lib/dist/Client.js
- var token = secret jsonwebtoken_1.sign({}, secret) : undefined; //line: 167 change this with var token = secret //? jsonwebtoken_1.sign({}, secret) : undefined;
- var WS = require("ws"); Change ws with isomorphic-ws on line: 73 with token var WS = require("isomorphic-ws");
Change on prisma-client/index.js
- Change secret on line: 85 with token
- prisma-client-lib change with prisma-client-lib-browser/src/prisma-client-lib