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.1 to 1.0.2

2

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

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

@@ -29,6 +29,7 @@ # vite-plugin-turbosnap

```ts
```js
// .storybook/main.js
const turbosnap = require('vite-plugin-turbosnap');
const { mergeConfig } = require('vite');

@@ -38,11 +39,6 @@ module.exports = {

async viteFinal(config, { configType }) {
// Turbosnap is only useful when building for production
if (configType === 'PRODUCTION') {
config.plugins.push(turbosnap({ rootDir: config.root }));
}
// ...And any other config you need to change...
// return the customized config
return config;
return mergeConfig(config, {
plugins: configType === 'PRODUCTION' ? [turbosnap({ rootDir: config.root ?? process.cwd() })] : [],
// ...And any other config you need to change...
});
},

@@ -49,0 +45,0 @@ ```

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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