# @cosva-lab/serverless-webpack-prisma

> When using serverless webpack, you can save up to 50% of package capacity by deleting unnecessary Prisma engine.

Latest version **1.1.2-beta.0** (published 2023-01-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install @cosva-lab/serverless-webpack-prisma
pnpm add @cosva-lab/serverless-webpack-prisma
yarn add @cosva-lab/serverless-webpack-prisma
bun add @cosva-lab/serverless-webpack-prisma
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.2-beta.0 |
| Published | 2023-01-19 |
| First published | 2023-01-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=14.0 |
| Dependencies | 3 |
| Unpacked size | 22.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | EduardMcfly |
| Maintainers | cosva, nelsoncastellanos |
| Keywords | serverless, serverless-webpack, lambda, prisma, webpack |

## Links

- npm: https://www.npmjs.com/package/@cosva-lab/serverless-webpack-prisma
- Repository: https://github.com/cosva-lab/serverless-webpack-prisma
- Homepage: https://github.com/cosva-lab/serverless-webpack-prisma#readme
- Issues: https://github.com/cosva-lab/serverless-webpack-prisma/issues
- npm.io page: https://npm.io/package/@cosva-lab/serverless-webpack-prisma

## Dependencies (3)

- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [fs-extra](https://npm.io/package/fs-extra.md) ^11.1.0
- [fast-glob](https://npm.io/package/fast-glob.md) ^3.2.12

## Alternatives

- [@oh-my-pi/pi-natives](https://npm.io/package/@oh-my-pi/pi-natives.md) — 51.8K weekly downloads
- [@capgo/capacitor-light-sensor](https://npm.io/package/@capgo/capacitor-light-sensor.md) — 3.0K weekly downloads
- [@heyhuynhgiabuu/pi-diff](https://npm.io/package/@heyhuynhgiabuu/pi-diff.md) — 492 weekly downloads
- [@lotsa/verdant-lang-asm](https://npm.io/package/@lotsa/verdant-lang-asm.md) — 38 weekly downloads
- [new-era-syntax](https://npm.io/package/new-era-syntax.md) — 20 weekly downloads

## Recent versions

- 1.1.2-beta.0 (latest) — 2023-01-19

## README

# Serverless Webpack Prisma

When using serverless webpack, you can save up to 50% of package capacity by deleting unnecessary Prisma engines.

## How to use?

First, install the package by entering the following command.

```sh
npm install -D serverless-webpack-prisma
```

Add the corresponding plugin under the webpack plugin as shown below.

```yaml
plugins:
  - serverless-webpack
  - serverless-webpack-prisma
```

If you have already used the generate script below, please delete it.

```yaml
custom:
  webpack:
    packagerOptions:
      scripts:
        - prisma generate
```

This plugin also has some additional configs:

```yaml
custom:
  prisma:
    installDeps: false # Passing false will not install Prisma dependency during the build process. Default: true
    prismaPath: ../../ # Passing this param, plugin will change the directory to find the dir prisma containing the prisma/prisma.schema
    dataProxy: false # Passing this param, plugin will create the prisma client for use with a data proxy see: https://www.prisma.io/docs/data-platform/data-proxy
  webpack:
    webpackOutputPath: ./ # Passing this param, plugin will change the directory to find the dir .webpack
```

Congratulations. The setup is complete. In the future, packaging will automatically delete unnecessary resources.

```
Serverless: Generate prisma client for app...
Serverless: Remove unused prisma engine:
Serverless: - node_modules/.prisma/client/libquery_engine-darwin.dylib.node
Serverless: - node_modules/@prisma/engines/introspection-engine-darwin
Serverless: - node_modules/@prisma/engines/libquery_engine-darwin.dylib.node
Serverless: - node_modules/@prisma/engines/migration-engine-darwin
Serverless: - node_modules/@prisma/engines/prisma-fmt-darwin
```

---
_Source: https://npm.io/package/@cosva-lab/serverless-webpack-prisma · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
