Skip to content

Support installing binaries for multiple platforms #2898

@jacobjove

Description

@jacobjove

Describe the feature

It would be great if SWC could optionally be installed for multiple platforms at the same time by specifying the binary targets (e.g., MacOS and Linux).

My use case: I have a NextJS application running in Docker. In dev environment, I use a volume for node_modules so that when I install a package in the project on my MacBook, the package is also added in the development container without me having to rebuild the container or run something like docker compose exec nextjs npm i <package>. This has worked well for me and is very convenient. However, currently, it does not work for SWC; if I run npm i -D @swc/cli @swc/core on my MacBook, it uses the binary for MacOS, so the Linux-based container does not get what it needs.

Here's an example of a similar feature that I use for Prisma:
https://www.prisma.io/docs/concepts/components/prisma-schema/generators#binary-targets

Babel plugin or link to the feature description

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions