Skip to content

<style src="./relative-path.css"> causes ENOENT when using with rolldown (tsdown) #201

@pont1s

Description

@pont1s

Describe the bug

Using an external stylesheet via <style src="./Button.css" /> in a Vue SFC fails with ENOENT when bundling with tsdown. The same setup works correctly with Vite.

Steps for reproduction:

  1. pnpm i
  2. pnpm build

Error

  [plugin unplugin-vue]
  Error: ENOENT: no such file or directory, open './Button.css'
      at Object.readFileSync (node:fs:440:20)
      at LoadPluginContextImpl.load (unplugin-vue/dist/core-1z6RfQNO.mjs:898:30)

Reproduction

https://github.com/pont1s/unplugin-vue-rolldown-style-src-reproduction/

System Info

System:
    OS: macOS 26.3.1
    CPU: (8) arm64 Apple M1
    Memory: 72.16 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 24.11.1
    pnpm: 10.33.0

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions