Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Library does not work when using certain addons #2

Merged
merged 1 commit into from
Feb 3, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import { combineParameters } from "@storybook/client-api";
import addons, { mockChannel } from '@storybook/addons';
import type { Story, Meta, StoryContext } from "@storybook/vue3";
import type { StoryFnVueReturnType, ContextedStory, GlobalConfig, StoriesWithPartialProps } from "./types";

import decorateStory from "./decorateStory";

let globalStorybookConfig: GlobalConfig = {};

// Some addons use the channel api to communicate between manager/preview, and this is a client only feature, therefore we must mock it.
addons.setChannel(mockChannel());

export function setGlobalConfig(config: GlobalConfig) {
globalStorybookConfig = config;
}
Expand Down