-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
fix(optimizer): align relative build.rollupOptions.input
resolution with rollup
#20080
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
fix(optimizer): align relative build.rollupOptions.input
resolution with rollup
#20080
Conversation
/ecosystem-ci run |
commit: |
This comment was marked as outdated.
This comment was marked as outdated.
📝 Ran ecosystem CI on
✅ astro, histoire, marko, quasar, nuxt, rakkas, react-router, previewjs, ladle, qwik, sveltekit, storybook, unocss, vuepress, vite-plugin-svelte, waku, vite-setup-catalogue, vite-plugin-pwa, vite-environment-examples, vite-plugin-vue, vite-plugin-cloudflare, vite-plugin-react, vitepress |
Hmm, it seems vike fails on this branch and passes on latest main (https://github.com/vitejs/vite-ecosystem-ci/actions/runs/151765559389). |
It seems |
It seems it passes with rollup 4.38.0 and fails with 4.39.0. |
OK. |
/ecosystem-ci run |
📝 Ran ecosystem CI on
✅ laravel, react-router, quasar, qwik, ladle, nuxt, unocss, storybook, vite-plugin-pwa, vite-plugin-react, rakkas, vite-environment-examples, vite-setup-catalogue, vitepress, marko, vitest, vite-plugin-svelte, vuepress, waku, vite-plugin-vue |
vike is failing with a different error but the reason is same with #20080 (comment) and not caused by this PR. |
Description
computeEntries
resolves relativebuild.rollupOptions.input
from theroot
.vite/packages/vite/src/node/optimizer/scan.ts
Lines 244 to 265 in 61b6b96
vite/packages/vite/src/node/server/pluginContainer.ts
Lines 341 to 344 in 61b6b96
reproduction: https://stackblitz.com/edit/vitejs-vite-nte18shp?file=package.json,vite.config.js&terminal=dev
On the other hand, rollup resolves relative
build.rollupOptions.input
fromprocess.cwd()
.This PR fixes the
computeEntries
to align the behavior with rollup. I think we should align with rollup, but that would probably have a bigger impact, so I made that a separate PR.A workaround is to call
path.resolve
in the config before passing tobuild.rollupOptions.input
.reported at #15834 (reply in thread)
refs #20079