Socket
Socket
Sign inDemoInstall

vite-plugin-turbosnap

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-turbosnap - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc