vite icon indicating copy to clipboard operation
vite copied to clipboard

"Could not auto-determine entry point" when using library mode

Open sxxov opened this issue 1 year ago • 2 comments

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

  1. npm i && vite dev
  2. See the warning in the terminal
  3. Uncomment the lines for rollupOptions in vite.config.js
  4. 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

sxxov avatar Mar 25 '24 08:03 sxxov

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.

pguilbert avatar Jun 10 '25 19:06 pguilbert