-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20594 from storybookjs/norbert/preview-optimization
Ensure no duplicate code in preview when using vite
- Loading branch information
Showing
5 changed files
with
38 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,32 @@ | ||
import * as ADDONS from '@storybook/preview-api/dist/addons'; | ||
import * as CHANNEL_POSTMESSAGE from '@storybook/channel-postmessage'; | ||
import * as CHANNEL_WEBSOCKET from '@storybook/channel-websocket'; | ||
import * as CHANNELS from '@storybook/channels'; | ||
import * as CLIENT_API from '@storybook/preview-api/dist/client-api'; | ||
import * as CLIENT_LOGGER from '@storybook/client-logger'; | ||
import * as CORE_CLIENT from '@storybook/preview-api/dist/core-client'; | ||
import * as CORE_EVENTS from '@storybook/core-events'; | ||
import * as PREVIEW_API from '@storybook/preview-api'; | ||
|
||
// DEPRECATED, remove in 8.0 | ||
import * as ADDONS from '@storybook/preview-api/dist/addons'; | ||
import * as CLIENT_API from '@storybook/preview-api/dist/client-api'; | ||
import * as CORE_CLIENT from '@storybook/preview-api/dist/core-client'; | ||
import * as PREVIEW_WEB from '@storybook/preview-api/dist/preview-web'; | ||
import * as STORE from '@storybook/preview-api/dist/store'; | ||
|
||
import type { globals } from './types'; | ||
|
||
// Here we map the name of a module to their VALUE in the global scope. | ||
export const values: Required<Record<keyof typeof globals, any>> = { | ||
'@storybook/addons': ADDONS, | ||
'@storybook/channel-postmessage': CHANNEL_POSTMESSAGE, | ||
'@storybook/channel-websocket': CHANNEL_WEBSOCKET, | ||
'@storybook/channels': CHANNELS, | ||
'@storybook/client-api': CLIENT_API, | ||
'@storybook/client-logger': CLIENT_LOGGER, | ||
'@storybook/core-client': CORE_CLIENT, | ||
'@storybook/core-events': CORE_EVENTS, | ||
'@storybook/preview-api': PREVIEW_API, | ||
|
||
// DEPRECATED, remove in 8.0 | ||
'@storybook/addons': ADDONS, | ||
'@storybook/client-api': CLIENT_API, | ||
'@storybook/core-client': CORE_CLIENT, | ||
'@storybook/preview-web': PREVIEW_WEB, | ||
'@storybook/store': STORE, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters