1.2.0 • Published 9 months ago

serverless-webpack-prisma v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

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.

npm install -D serverless-webpack-prisma

Add the corresponding plugin under the webpack plugin as shown below.

plugins:
  - serverless-webpack
  - serverless-webpack-prisma

If you have already used the generate script below, please delete it.

custom:
  webpack:
    packagerOptions:
      scripts:
        - prisma generate

This plugin also has some additional configs:

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
    useSymLinkForPrisma: true # Passing this param, plugin will symlink prisma dir instead of copying.
    ignoreFunctions: # Passing this param, we tell plugin which functions should be ignored and processed as non prisma based functions.
      - someNonPrismaFunction
    version: "5.0.0" # Passing this param, we teel plugin which version of prisma to install: Default: "" 
  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
1.2.0

9 months ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago