-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vite: Fix prebundling #19978
Merged
Merged
Vite: Fix prebundling #19978
Changes from 27 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
afcadb7
Vite: Fix prebundling
IanVS 8e929c8
Remove storybook re-exports from vite frameworks
IanVS aef13af
Simplify preview globals
IanVS 6273444
Add missing dependencies to @storybook/preview
IanVS 080548a
Restore code/lib/preview/src/modules/channel-postmessage.ts
ndelangen cd9a694
Restore code/lib/preview/src/modules/addons.ts
ndelangen fb8a1ab
Restore code/lib/preview/src/modules/channel-websocket.ts
ndelangen dc0521e
Restore code/lib/preview/src/modules/channels.ts
ndelangen ec57963
Restore code/lib/preview/src/modules/client-api.ts
ndelangen 0d69dfd
Restore code/lib/preview/src/modules/client-logger.ts
ndelangen 4f1ac01
Restore code/lib/preview/src/modules/core-client.ts
ndelangen 74617eb
Restore code/lib/preview/src/modules/core-events.ts
ndelangen d3e4a3f
Restore code/lib/preview/src/modules/preview-api.ts
ndelangen af76149
Restore code/lib/preview/src/modules/preview-web.ts
ndelangen 1cea9ac
Restore code/lib/preview/src/modules/store.ts
ndelangen ae934bf
Apply suggestions from code review
ndelangen adcdd1b
Update code/lib/builder-vite/src/optimizeDeps.ts
ndelangen 25774cf
Merge branch 'next' into vite/prebundle
ndelangen a13ad44
sort list
ndelangen 4571e3a
cleanup dependencies
ndelangen 3e29def
fix linting
ndelangen 6aad1f1
regen lockfile
ndelangen 0767cc3
Merge branch 'next' into vite/prebundle
ndelangen 0a3f0eb
not add webpack stuff when linking to a vite project
ndelangen 30cfe6c
Merge branch 'next' into vite/prebundle
ndelangen 0a86cd2
remove the user's build property of their vite config, because it's a…
ndelangen d6bb929
fix lockfile
ndelangen 3442b18
remove message, after talking it over, it's too noisy
ndelangen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 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,11 +1 @@ | ||
// TODO: figure out if any of this is required | ||
// possibly make it not required, framework should never be imported directly, except for types in config files | ||
|
||
export { createChannel as createPostMessageChannel } from '@storybook/channel-postmessage'; | ||
export { createChannel as createWebSocketChannel } from '@storybook/channel-websocket'; | ||
|
||
export { addons } from '@storybook/preview-api'; | ||
export { composeConfigs, PreviewWeb } from '@storybook/preview-api'; | ||
export { ClientApi } from '@storybook/preview-api'; | ||
|
||
export type { StorybookConfig } from '@storybook/builder-vite'; |
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,8 +1 @@ | ||
export { createChannel as createPostMessageChannel } from '@storybook/channel-postmessage'; | ||
export { createChannel as createWebSocketChannel } from '@storybook/channel-websocket'; | ||
|
||
export { addons } from '@storybook/preview-api'; | ||
export { composeConfigs, PreviewWeb } from '@storybook/preview-api'; | ||
export { ClientApi } from '@storybook/preview-api'; | ||
|
||
export type { StorybookConfig } from '@storybook/builder-vite'; |
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,8 +1 @@ | ||
export { createChannel as createPostMessageChannel } from '@storybook/channel-postmessage'; | ||
export { createChannel as createWebSocketChannel } from '@storybook/channel-websocket'; | ||
|
||
export { addons } from '@storybook/preview-api'; | ||
export { composeConfigs, PreviewWeb } from '@storybook/preview-api'; | ||
export { ClientApi } from '@storybook/preview-api'; | ||
|
||
export type { StorybookConfig } from '@storybook/builder-vite'; |
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,8 +1 @@ | ||
export { createChannel as createPostMessageChannel } from '@storybook/channel-postmessage'; | ||
export { createChannel as createWebSocketChannel } from '@storybook/channel-websocket'; | ||
|
||
export { addons } from '@storybook/preview-api'; | ||
export { composeConfigs, PreviewWeb } from '@storybook/preview-api'; | ||
export { ClientApi } from '@storybook/preview-api'; | ||
|
||
export type { StorybookConfig } from '@storybook/builder-vite'; |
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,8 +1 @@ | ||
export { createChannel as createPostMessageChannel } from '@storybook/channel-postmessage'; | ||
export { createChannel as createWebSocketChannel } from '@storybook/channel-websocket'; | ||
|
||
export { addons } from '@storybook/preview-api'; | ||
export { composeConfigs, PreviewWeb } from '@storybook/preview-api'; | ||
export { ClientApi } from '@storybook/preview-api'; | ||
|
||
export type { StorybookConfig } from '@storybook/builder-vite'; |
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
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
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
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
declare module 'rollup-plugin-external-globals'; |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could remove the
mergeConfig
here, since we do not want to merge the build config with the user's build config.