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.2 to 1.0.3

2

package.json
{
"name": "vite-plugin-turbosnap",
"version": "1.0.2",
"version": "1.0.3",
"description": "Enables the use of Chromatic Turbosnap in vite storybook projects",

@@ -5,0 +5,0 @@ "keywords": [

@@ -17,3 +17,3 @@ # vite-plugin-turbosnap

- `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.
- Storybook 7.0+, or 6.5 with `@storybook/builder-vite` [0.1.22](https://github.com/storybookjs/builder-vite/releases/tag/v0.1.22) or higher.

@@ -33,13 +33,21 @@ ### Install

const turbosnap = require('vite-plugin-turbosnap');
const { mergeConfig } = require('vite');
import turbosnap from "vite-plugin-turbosnap";
import { mergeConfig } from "vite";
module.exports = {
core: { builder: '@storybook/builder-vite' },
export default {
// ... your existing storybook config
async viteFinal(config, { configType }) {
return mergeConfig(config, {
plugins: configType === 'PRODUCTION' ? [turbosnap({ rootDir: config.root ?? process.cwd() })] : [],
// ...And any other config you need to change...
plugins:
configType === "PRODUCTION"
? [
turbosnap({
// This should be the base path of your storybook. In monorepos, you may only need process.cwd().
rootDir: config.root ?? process.cwd(),
}),
]
: [],
});
},
};
```

@@ -46,0 +54,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