Skip to content

Request: build dist before publishing instead of on postinstall #40

@MarcPorciuncula

Description

@MarcPorciuncula

Hi there, thanks for creating this integration!

Unfortunately I am unable to run this package in production, as the postinstall script tries to run tsc.

In my production deployments devDependencies are not installed. So when npm performs postinstall on @as-integrations/koa, the call to tsc fails as there are a bunch of @types packages missing.

It appears this package builds the dist itself on postinstall instead of building and including the dist in the published package. Is there a particular reason for this?

You can avoid having to run the typescript compiler on consumers machines by changing the "postinstall" script to "prepare" or "prepack", then add "files": ["dist"] so the built files would be included in the package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions