Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate package.json alongside Photon #664

Closed
1 task done
peterp opened this issue Oct 5, 2019 · 1 comment
Closed
1 task done

Generate package.json alongside Photon #664

peterp opened this issue Oct 5, 2019 · 1 comment
Labels
kind/feature A request for a new feature. topic: prisma-client

Comments

@peterp
Copy link

peterp commented Oct 5, 2019

Netlify's zip-it-and-ship-it uses the package.json's main and files keys to know what needs to be bundled during deployment.

I generate my prisma2 client into a yarn workspace with the following in my package.json:

{
  "name": "@generated/photon",
  "private": true,
  "version": "0.0.0-generated",
  "files": [
    "runtime/query-engine-linux-glibc-libssl1.0.2",
    "runtime/index.js"
  ],
  "types": "index.d.ts",
  "main": "index.js"
}

I then install this yarn workspace package as a dependency of my project which allows everything to bundle correctly.

I think that generating a package.json file, and adding the @geneated/photon package as a local file://-based dependency to a project might make the generated package a bit more standardised and easier to deal with odd edge cases.

@timsuchanek
Copy link
Contributor

As we now have the facade package in place, this can be closed 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature A request for a new feature. topic: prisma-client
Projects
None yet
Development

No branches or pull requests

4 participants