Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

storybook-preset-nuxt

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

storybook-preset-nuxt

Nuxt.js preset for Storybook

beta
latest
Source
npmnpm
Version
1.0.0-beta.2
Version published
Maintainers
1
Created
Source

Deprecated

Use @nuxtjs/storybook instead.

storybook-preset-nuxt

npm version

One-line Nuxt.js configuration for Storybook.

This preset is designed to use alongside @storybook/vue.

Basic usage

First, install this preset to your project.

# yarn
yarn add -D storybook-preset-nuxt@beta

# npm
npm i -D storybook-preset-nuxt@beta

Once installed, add this preset to the appropriate file:

  • .storybook/main.js (for Storybook >= 5.3)
    // .storybook/main.js
    module.exports = { addons: ['storybook-preset-nuxt'] }
    
  • .storybook/presets.js (for Storybook >= 5.1)
    // .storybook/presets.js
    module.exports = ['storybook-preset-nuxt']
    

Advanced usage

If you have custom Nuxt config file, you can specify the path to the file.

// .storybook/main.js
const path = require('path')

module.exports = {
  addons: [
    {
      name: 'storybook-preset-nuxt',
      options: {
        nuxtConfig: path.resolve(__dirname, '../path/to/config')
      }
    }
  ]
}

Troubleshooting

Since Storybook depends on core-js@3, in most cases, package managers resolves core-js to core-js@3. This would cause errors because Nuxt.js relies on core-js@2. To solve these errors, add core-js@2 as a direct dependency of your package or setup Nuxt.js to use core-js@3.

FAQs

Package last updated on 08 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts