-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
fix(vite): handle resolving string vite input #32527
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
Conversation
|
WalkthroughThe functions resolveClientEntry and resolveServerEntry in packages/vite/src/utils/config.ts were updated to improve how the input variable is handled. The new logic first checks if input is a string and returns it immediately if so. If input is not a string and not an array, the functions then check for and return the relevant property (entry or server) if present. The error handling for missing entries remains unchanged. No changes were made to the function signatures or exported declarations. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (2)`**/*.{ts,tsx}`: Follow standard TypeScript conventions and best practices
📄 Source: CodeRabbit Inference Engine (.github/copilot-instructions.md) List of files the instruction was applied to:
`**/*.{ts,tsx,vue}`: Use clear, descriptive variable and function names Add comm...
📄 Source: CodeRabbit Inference Engine (.github/copilot-instructions.md) List of files the instruction was applied to:
🧠 Learnings (2)📓 Common learnings
packages/vite/src/utils/config.ts (5)
⏰ Context from checks skipped due to timeout of 90000ms (9)
🔇 Additional comments (2)
✨ Finishing Touches
🧪 Generate Unit Tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@nuxt/kit
nuxt
@nuxt/rspack-builder
@nuxt/schema
@nuxt/vite-builder
@nuxt/webpack-builder
commit: |
Thank you so much for this <3 For extra context, the issue happened in Storybook's CI and can be seen here: with the following error message: => Failed to build the preview
Error: No entry found in rollupOptions.input
at resolveClientEntry (file://./node_modules/@nuxt/vite-builder/dist/shared/vite-builder.BcQqDUYS.mjs:124:9)
at configResolved (file://./node_modules/@nuxt/vite-builder/dist/shared/vite-builder.BcQqDUYS.mjs:173:15)
at file://./node_modules/vite/dist/node/chunks/dep-DBxKXgDP.js:49086:67
at Array.map (<anonymous>)
at resolveConfig (file://./node_modules/vite/dist/node/chunks/dep-DBxKXgDP.js:49086:53)
at async createBuilder (file://./node_modules/vite/dist/node/chunks/dep-DBxKXgDP.js:46707:18)
at async build (file://./node_modules/vite/dist/node/chunks/dep-DBxKXgDP.js:45981:19)
at async build (./node_modules/@storybook/builder-vite/dist/index.js:84:230)
at async Promise.all (index 0)
at async buildStaticStandalone (./node_modules/storybook/dist/core-server/index.cjs:35885:3) and that's because Storybook's vite builder uses |
CodSpeed Performance ReportMerging #32527 will not alter performanceComparing Summary
|
🔗 Linked issue
📚 Description
when used with storybook, the entry is a string (and this might also be true with other vite-based integrations which reuse part of the nuxt vite config, e.g. test-utils, histoire, etc.)
spotted by @yannbf ❤️