Skip to content

Upgrade to v8 breaks ?inline #22943

Description

@jendrikw

Describe the bug

I have a project where I import assets with ?inline.

This is the project on vite v7: https://gitlab1.ptb.de/digitaldynamicmeasurement/dccviewer-js/-/tree/1218d1660dec81abbc894946e522a8c416e95fb5/

I upgraded vite to 8.1.4. The only other thing I changed is build.minify from "esbuild" to "oxc".

Neither the docs nor the migration guide mention anything about ?import, so I expect everything to work.

I'm sorry the example is not minimal, I could not reproduce the error in a simplified setting.

Reproduction

https://gitlab1.ptb.de/digitaldynamicmeasurement/dccviewer-js/-/tree/d9476967df2a550e6b563bc782df4d66c8de1e9c/

Steps to reproduce

  1. Clone this repo and check out the vite-v8 branch https://gitlab1.ptb.de/digitaldynamicmeasurement/dccviewer-js/-/commit/d9476967df2a550e6b563bc782df4d66c8de1e9c
  2. Run vite build
  3. Observe a build failure (full log below):
[UNLOADABLE_DEPENDENCY] Could not load src/certs/D-TRUST_Root_CA_2_2021.der?inline
    ╭─[ src/certs/validator.ts:14:25 ]
    │
 14 │     await parseCert(import("./D-TRUST_Root_CA_2_2021.der?inline")),
    │                            ──────────────────┬──────────────────  
    │                                              ╰──────────────────── No such file or directory (os error 2)
────╯

...
    at aggregateBindingErrorsIntoJsError (file:///home/USER/src/dccviewer-js/node_modules/rolldown/dist/shared/error-BHRSI0R7.mjs:48:18)
    at unwrapBindingResult (file:///home/USER/src/dccviewer-js/node_modules/rolldown/dist/shared/error-BHRSI0R7.mjs:18:128)
    at #build (file:///home/USER/src/dccviewer-js/node_modules/rolldown/dist/shared/rolldown-build-CtPvmZgJ.mjs:3276:34)
    at async buildEnvironment (file:///home/USER/src/dccviewer-js/node_modules/vite/dist/node/chunks/node.js:33011:66)
    at async Object.build (file:///home/USER/src/dccviewer-js/node_modules/vite/dist/node/chunks/node.js:33433:19)
    at async Object.buildApp (file:///home/USER/src/dccviewer-js/node_modules/vite/dist/node/chunks/node.js:33430:153)
    at async CAC.<anonymous> (file:///home/USER/src/dccviewer-js/node_modules/vite/dist/node/cli.js:776:3) {
  errors: [Getter/Setter]
}

System Info

System:
    OS: Linux 7.0 Debian GNU/Linux forky/sid
    CPU: (16) x64 AMD Ryzen 7 PRO 5750G with Radeon Graphics
    Memory: 10.36 GB / 30.71 GB
    Container: Yes
    Shell: 5.3.9 - /bin/bash
  Binaries:
    Node: 24.18.0 - /usr/bin/node
    npm: 11.16.0 - /usr/bin/npm
    pnpm: 10.30.3 - /home/USER/.local/bin/pnpm
  Browsers:
    Chromium: 148.0.7778.178
    Firefox: 140.12.0esr
    Firefox Developer Edition: 140.12.0esr
  npmPackages:
    vite: ^8.1.4 => 8.1.4

Used Package Manager

npm

Logs

Added as an attachment because it was over 65k characters.
vite.log

Validations

Metadata

Metadata

Assignees

No one assigned

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions