Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To use pnpm to build a single workspace only, you can follow these steps:

  1. Open your terminal and navigate to the root directory of your project.

  2. Run the pnpm install command to install all the dependencies in all the workspaces.

  3. Run the pnpm run build command followed by the name of the workspace you want to build. For example, if your project has a workspace named "frontend", you can run the following command:

    pnpm run build --filter frontend
    

    This will build only the "frontend" workspace.

  4. Once the build process is complete, you can find the built files in the "dist" folder of the "frontend" workspace.

Note: pnpm uses the --filter option to specify which workspace to build. If you want to build multiple workspaces, you can separate their names with commas. For example:

pnpm run build --filter frontend,backend

This will build both the "frontend" and "backend" workspaces.