-
-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Closed
agrc/kitchen-sink
#125Labels
feat: library modep3-downstream-blockerBlocking the downstream ecosystem to work properly (priority)Blocking the downstream ecosystem to work properly (priority)regressionThe issue only appears after a new releaseThe issue only appears after a new release
Description
Describe the bug
I have a vite config that builds and outputs multiple files in "library mode". (see minimal repro) It works fine in vite v2, but fails in vite v3.
Steps to reproduce:
- load reproduction URL
npm i
andnpm run vite
to see successful case in v2- update
vite
inpackage.json
to3.0.0
npm i
andnpm run vite
to see failed case in v3
Note I've also tried just putting 1 of the files as the lib.entry
, and alternatively creating a "dummy" single file (e.g. blank.ts
) as the entry point, while keeping the list of files in rollupOptions.input
. It seems the rollupOptions.input
is ignored in v3, as it's only building the file in lib.entry
.
Reproduction
https://stackblitz.com/edit/vitejs-vite-wspcu8
System Info
Note that this also fails in Linux environments, such as StackBlitz
System:
OS: Windows 10 10.0.19044
CPU: (8) x64 Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz
Memory: 22.45 GB / 31.95 GB
Binaries:
Node: 16.13.2 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.19 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 8.11.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.19041.1266.0), Chromium (103.0.1264.49)
npmPackages:
vite: 3.0.0 => 3.0.0
Used Package Manager
yarn and/or npm
Logs
vite v2
$ vite build .
vite v2.9.14 building for production...
✓ 2 modules transformed.
dist/file1.cjs.js 0.04 KiB / gzip: 0.06 KiB
dist/file2.cjs.js 0.04 KiB / gzip: 0.06 KiB
vite v3
$ vite build .
vite v3.0.0 building for production...
✓ 0 modules transformed.
Could not resolve entry module (*.ts).
error during build:
Error: Could not resolve entry module (*.ts).
at error (file:///X:/vite3-repro/node_modules/rollup/dist/es/shared/rollup.js:1858:30)
at ModuleLoader.loadEntryModule (file:///X:/vite3-repro/node_modules/rollup/dist/es/shared/rollup.js:22396:20)
at async Promise.all (index 0)
error Command failed with exit code 1.
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- 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.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
ernestoalejo, adam-te, enzoferey, plmrry, awacode21 and 6 moreawacode21, steveoh and AndrewLeedham
Metadata
Metadata
Assignees
Labels
feat: library modep3-downstream-blockerBlocking the downstream ecosystem to work properly (priority)Blocking the downstream ecosystem to work properly (priority)regressionThe issue only appears after a new releaseThe issue only appears after a new release