UNPKG

@storybook/svelte

Version:

Storybook for Svelte: Develop Svelte Component in isolation with Hot Reloading.

16 lines 588 B
import "core-js/modules/es.promise.js"; import path from 'path'; import { findDistEsm } from '@storybook/core-common'; export async function webpackFinal(webpackConfig, options) { var svelteOptions = await options.presets.apply('svelteOptions', {}, options); webpackConfig.module.rules.push({ test: /\.svelte$/, loader: path.resolve(`${__dirname}/svelte-docgen-loader`), enforce: 'post', options: svelteOptions }); return webpackConfig; } export var previewAnnotations = function (entry = []) { return [...entry, findDistEsm(__dirname, 'client/docs/config')]; };