This nx-plugin for Chromatic is work-in-progress.
This nx-plugin is not an official Chromatic, NX or Storybook project. Please don't bother them with issues caused by this plugin.
This nx-plugin should help you to:
- add Chromatic CLI to do Visual Testing to your Storybook enabled projects
- add the Chromatic Storybook Add-on to your Storybook enabled projects
Install the package with:
-
pnpm:
pnpm nx add nx-chromatic
-
npm:
npx nx add nx-chromatic
-
During the install your
nx.json
file will be modified to provide the targetchromatic
with general options. -
During the install your
main.ts
files will be modified to add the@chromatic-com/storybook
Storybook add-on. -
During the install an empty
chromatic.config.json
file will be created. From within Storybook this file can be further configured by linking to Chromatic.
For each project you want to have Chromatic as target, add in project.json:
"chromatic": { },
| nx | nx-chromatic | storybook | chromatic | @chromatic-com/storybook | | v20 | v20.0.x | v8 | >= v11.0.0 | >= v1.9.0 |