vite-plugin-turbosnap
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "vite-plugin-turbosnap", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Enables the use of Chromatic Turbosnap in vite storybook projects", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -11,8 +11,18 @@ # vite-plugin-turbosnap | ||
## Installation | ||
## Setup | ||
### Prerequisites | ||
- A [Chromatic](https://www.chromatic.com/) account. | ||
- `chromatic-cli` [6.5.0](https://github.com/chromaui/chromatic-cli/blob/main/CHANGELOG.md#650---2022-02-21) or higher. | ||
- `@storybook/builder-vite` [0.1.22](https://github.com/storybookjs/builder-vite/releases/tag/v0.1.22) or higher. | ||
### Install | ||
```bash | ||
npm i -D vite-plugin-turbosnap | ||
npm i --save-dev vite-plugin-turbosnap | ||
``` | ||
### Configuration | ||
Add this plugin to `viteFinal` in your `.storybook/main.js`: | ||
@@ -26,5 +36,6 @@ | ||
module.exports = { | ||
core: { builder: 'storybook-builder-vite' }, | ||
core: { builder: '@storybook/builder-vite' }, | ||
async viteFinal(config, { configType }) { | ||
if (configType === 'PRODUCTION' && outputDir) { | ||
// Turbosnap is only useful when building for production | ||
if (configType === 'PRODUCTION') { | ||
config.plugins.push(turbosnap({ rootDir: config.root })); | ||
@@ -44,8 +55,2 @@ } | ||
## Prerequisites | ||
- A [Chromatic](https://www.chromatic.com/) account. | ||
- chromatic-cli [6.5.0](https://github.com/chromaui/chromatic-cli/blob/main/CHANGELOG.md#650---2022-02-21) or higher. | ||
- storybook-builder-vite 0.1.17 or higher. | ||
## How it works | ||
@@ -52,0 +57,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10505
60