-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
feat(sveltekit): upgraded sveltekit support to svelltekit v1.0.0 (fix #392, #397) #402
Conversation
Open in CodeSandbox Web Editor | VS Code | VS Code Insiders |
Run & review this pull request in StackBlitz Codeflow. |
✅ Deploy Preview for histoire-examples-svelte3 ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for histoire-controls ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for histoire-site ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for histoire-examples-vue3 ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Great work @bhvngt. I've closed my PR in favor of this. Thanks a lot. |
@@ -78,10 +78,11 @@ export async function mergeHistoireViteConfig (viteConfig: InlineConfig, ctx: Co | |||
let flatPlugins = [] | |||
if (viteConfig.plugins) { | |||
for (const pluginOption of viteConfig.plugins) { | |||
if (Array.isArray(pluginOption)) { | |||
flatPlugins.push(...await Promise.all(pluginOption)) | |||
const resolvedPluginOption = await pluginOption |
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.
I don't understand why this changed. Now if it's an array it's being awaited twice
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.
Ok. I guess awaiting twice is actually correct: https://github.com/vitejs/vite/blob/af86e5bcfe4b78f486f499cba09c3270fb151d54/packages/vite/src/node/config.ts#L111
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.
A vite plugin can be of the form: [promise, promise, promise]
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.
Thanks!!
@Akryum anything else we need to do to merge this PR? |
@benmccann This PR was pending the merge of the vite 4 branch 😉 |
Description
This PR makes
histoire
compatible to recent changes in the svelte v1.0.0 They arev1.0.0
With above changes, histoire should be able to work with svelte kit v1.0.0 without any changes to their setup.
This PR is a part duplicate of #393, which was addressing the first of the above issues. Shout out to @vnphanquang for initiating this effort.
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).