1.0.0-beta.2 • Published 4 years ago

storybook-preset-nuxt v1.0.0-beta.2

Weekly downloads
18
License
MIT
Repository
github
Last release
4 years ago

storybook-preset-nuxt

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@alpha

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

Once installed, add this preset to the appropriate file:

  • .storybook/main.js (for Storybook >= 5.3)
    // .storybook/main.js
    module.exports = { presets: ['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/presets.js
const path = require('path')

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