Choosing a package
Commerce Klaus packages are designed to work independently and share SFCC semantics where they overlap.
| Goal | Package |
|---|---|
| Share project settings across Commerce Klaus tools | @commerce-klaus/config |
| Run Commerce Klaus commands through the Salesforce B2C CLI | @commerce-klaus/b2c-plugin |
| Detect invalid SFCC patterns with ESLint or Oxlint | @commerce-klaus/eslint-config-sfcc |
| Resolve cartridge modules in the editor and typecheck JavaScript | @commerce-klaus/typescript-sfcc |
| Unit-test SFCC cartridge code with Vitest | @commerce-klaus/vitest-sfcc |
| Resolve SFCC server-side modules in other Vite-based tools | @commerce-klaus/vite-plugin-sfcc-modules |
| Run SFCC server-side modules in Babel-based tooling | @commerce-klaus/babel-plugin-sfcc-modules |
| Build another SFCC-aware tool on the shared resolution core | @commerce-klaus/sfcc-module-resolver |
A sensible adoption path
- Add the lint config through ESLint or Oxlint to detect runtime compatibility problems with little project restructuring.
- Add the TypeScript tooling for editor feedback, CI typechecks, and generated project-specific declarations.
- Add the Vitest integration when unit tests need to execute cartridge modules in an SFCC-aware runtime.
- Add the Vite or Babel adapter only when another tool needs cartridge transformation without the Vitest runtime.
Do not configure vitest-sfcc together with vite-plugin-sfcc-modules; the Vitest integration already includes cartridge resolution and transformation. The standalone Vite and Babel plugins remain alternatives for other tooling pipelines.