vite
vite copied to clipboard
"Could not auto-determine entry point" when using library mode
Describe the bug
The warning appears when using the default config suggested for Library mode & running vite dev.
As with the related issue #15701, the problem seems to come from the explicit checking of config.build.rollupOptions?.input. If we were to supply said setting explicitly in the config, using the same value as build.lib.entry, the warning goes away.
Reproduction
https://stackblitz.com/edit/vitejs-vite-pu5huh?file=vite.config.js&terminal=dev
Steps to reproduce
npm i && vite dev- See the warning in the terminal
- Uncomment the lines for
rollupOptionsinvite.config.js - See no more warnings in the terminal
System Info
System:
OS: Windows 11 10.0.22631
CPU: (16) x64 AMD Ryzen 9 4900HS with Radeon Graphics
Memory: 3.08 GB / 15.42 GB
Binaries:
Node: 20.11.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.21 - C:\Program Files\nodejs\yarn.CMD
npm: 10.4.0 - ~\AppData\Roaming\npm\npm.CMD
pnpm: 8.7.4 - ~\AppData\Roaming\npm\pnpm.CMD
Browsers:
Edge: Chromium (122.0.2365.92)
Internet Explorer: 11.0.22621.1
Used Package Manager
npm
Logs
Click to expand!
(!) Could not auto-determine entry point from rollupOptions or html files and there are no explicit optimizeDeps.include patterns. Skipping dependency pre-bundling.
VITE v5.2.6 ready in 2152 ms
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
➜ press h + enter to show help
Validations
- [X] Follow our Code of Conduct
- [X] Read the Contributing Guidelines.
- [X] Read the docs.
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
- [X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- [X] The provided reproduction is a minimal reproducible example of the bug.
I'm unable to reproduce it with the latest version of Vite: https://stackblitz.com/edit/vitejs-vite-mbpafbop?file=package.json This issue can be closed.