Reproduction link or steps
- Clone https://github.com/kermanx/vite8-import-glob-repro
cd app and pnpm install
pnpm run dev --> Works fine, styles are applied
pnpm run build or pnpm run build:rolldown --> Error:
What is expected?
Should build successfully.
What is actually happening?
[UNRESOLVED_IMPORT] Error: Could not resolve '../external/x.ts' in src/main.ts
╭─[ src/main.ts:1:38 ]
│
1 │ import * as __import_glob__0_0_ from "../external/x.ts";/* #__PURE__ */ Object.assign({"../external/x.ts": __import_glob__0_0_
│ ─────────┬────────
│ ╰────────── Module not found.
│
│ Help: 'src/main.ts' is imported by the following path:
│ - src/main.ts
│ - index.html
───╯
The path should be ../../external/x.ts
System Info
System:
OS: Linux 6.17 Ubuntu 24.04.3 LTS 24.04.3 LTS (Noble Numbat)
CPU: (16) x64 13th Gen Intel(R) Core(TM) i7-1360P
Memory: 11.02 GB / 31.06 GB
Container: Yes
Shell: 5.2.21 - /bin/bash
Binaries:
Node: 24.4.0 - /run/user/1000/fnm_multishells/1639967_1776327306640/bin/node
npm: 11.4.2 - /run/user/1000/fnm_multishells/1639967_1776327306640/bin/npm
pnpm: 10.33.0 - /run/user/1000/fnm_multishells/1639967_1776327306640/bin/pnpm
bun: 1.3.11 - /home/kerman/.bun/bin/bun
Browsers:
Firefox: 149.0.2
Firefox Developer Edition: 149.0.2
npmPackages:
rolldown: 1.0.0-rc.15 => 1.0.0-rc.15
vite: ^8.0.8 => 8.0.8
Any additional comments?
This is an inconsistency with the Vite dev (and Vite7 build) behavior.
Related workaroud commits: slidevjs/slidev@055baa8 / slidevjs/slidev@29acd94
Reproduction link or steps
cd appandpnpm installpnpm run dev--> Works fine, styles are appliedpnpm run buildorpnpm run build:rolldown--> Error:What is expected?
Should build successfully.
What is actually happening?
The path should be
../../external/x.tsSystem Info
System: OS: Linux 6.17 Ubuntu 24.04.3 LTS 24.04.3 LTS (Noble Numbat) CPU: (16) x64 13th Gen Intel(R) Core(TM) i7-1360P Memory: 11.02 GB / 31.06 GB Container: Yes Shell: 5.2.21 - /bin/bash Binaries: Node: 24.4.0 - /run/user/1000/fnm_multishells/1639967_1776327306640/bin/node npm: 11.4.2 - /run/user/1000/fnm_multishells/1639967_1776327306640/bin/npm pnpm: 10.33.0 - /run/user/1000/fnm_multishells/1639967_1776327306640/bin/pnpm bun: 1.3.11 - /home/kerman/.bun/bin/bun Browsers: Firefox: 149.0.2 Firefox Developer Edition: 149.0.2 npmPackages: rolldown: 1.0.0-rc.15 => 1.0.0-rc.15 vite: ^8.0.8 => 8.0.8Any additional comments?
This is an inconsistency with the Vite dev (and Vite7 build) behavior.
Related workaroud commits: slidevjs/slidev@055baa8 / slidevjs/slidev@29acd94