SalesforceCommerceCloud / pwa-kit

React-based JavaScript frontend framework to create a progressive web app (PWA) storefront for Salesforce B2C Commerce.
https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/pwa-kit-overview.html
BSD 3-Clause "New" or "Revised" License
285 stars 138 forks source link

[FEATURE] Support PWA Kit project for monorepo setup via `pnpm` or other dependency managers #2120

Open kevinxh opened 2 weeks ago

kevinxh commented 2 weeks ago

Is your feature request related to a problem? Please describe.

Note: this isn't about the pwa-kit monorepo, it's about making customer projects to support monorepo.

The pwa-kit-dev CLI commands is not compatible with other node dependency managers like pnpm. The build and start command have hardcoded paths to specific dependencies like webpack and babel-node.

const babelNode = p.join(
                require.resolve('webpack'),
                '..',
                '..',
                '..',
                '.bin',
                'babel-node'
            )

or const webpack = p.join(require.resolve('webpack'), '..', '..', '..', '.bin', 'webpack')

Describe the solution you'd like

Support common node monorepo toolings / dependency managers like pnpm.

mgalassi commented 2 weeks ago

This would be extremely valuable, as it opens to a broader set of different configurations when setting up the project in a monorepo. I hope the team will also consider the 2.x.x versions for this upgrade (most folks are still on them!).