diff --git a/code/lib/builder-vite/package.json b/code/lib/builder-vite/package.json index eec312098645..efdf68bfa83a 100644 --- a/code/lib/builder-vite/package.json +++ b/code/lib/builder-vite/package.json @@ -47,7 +47,6 @@ "@storybook/client-logger": "7.0.15", "@storybook/core-common": "7.0.15", "@storybook/csf-plugin": "7.0.15", - "@storybook/global": "^5.0.0", "@storybook/mdx2-csf": "^1.0.0", "@storybook/node-logger": "7.0.15", "@storybook/preview": "7.0.15", diff --git a/code/lib/builder-vite/src/codegen-set-addon-channel.ts b/code/lib/builder-vite/src/codegen-set-addon-channel.ts index 8e706cb6ae2e..aa866408415d 100644 --- a/code/lib/builder-vite/src/codegen-set-addon-channel.ts +++ b/code/lib/builder-vite/src/codegen-set-addon-channel.ts @@ -1,6 +1,5 @@ export async function generateAddonSetupCode() { return ` - import { global } from '@storybook/global'; import { createChannel as createPostMessageChannel } from '@storybook/channel-postmessage'; import { createChannel as createWebSocketChannel } from '@storybook/channel-websocket'; import { addons } from '@storybook/preview-api'; @@ -9,7 +8,7 @@ export async function generateAddonSetupCode() { addons.setChannel(channel); window.__STORYBOOK_ADDONS_CHANNEL__ = channel; - if (global.CONFIG_TYPE === 'DEVELOPMENT'){ + if (window.CONFIG_TYPE === 'DEVELOPMENT'){ const serverChannel = createWebSocketChannel({}); addons.setServerChannel(serverChannel); window.__STORYBOOK_SERVER_CHANNEL__ = serverChannel; diff --git a/code/yarn.lock b/code/yarn.lock index d86e634fa538..0eed741db2da 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -5567,7 +5567,6 @@ __metadata: "@storybook/client-logger": 7.0.15 "@storybook/core-common": 7.0.15 "@storybook/csf-plugin": 7.0.15 - "@storybook/global": ^5.0.0 "@storybook/mdx2-csf": ^1.0.0 "@storybook/node-logger": 7.0.15 "@storybook/preview": 7.0.15