When setting custom client output directory, generated package.json does not include "sideEffects: false" #15301
Labels
bug/1-unconfirmed
Bug should have enough information for reproduction, but confirmation has not happened yet.
kind/bug
A reported bug.
team/client
Issue for team Client.
Milestone
Bug description
When you generate the prisma client without specifying a custom path, the package.json at
@prisma/client/package.json
will specifysideEffects: false
.However, when you specify a custom path in your
schema.prisma
file, the generated json does not specifysideEffects: false
, and so the package will not be tree-shaken from your client-side bundle.How to reproduce
schema.prisma
to includeoutput = './some-custom-path'
within thegenerator client
sectionnpx prisma generate
package.json
sideEffects: false
is not presentExpected behavior
I would expect the
package.json
to includesideEffects: false
just as it does when not specifying a custom path.Prisma information
Environment & setup
Prisma Version
The text was updated successfully, but these errors were encountered: