Skip to content

[Bug]: resolveNewUrlToAsset doesn't catch new URL() with static template literals #8564

@mary-ext

Description

@mary-ext

Reproduction link or steps

https://stackblitz.com/edit/ukmprsm2
Rolldown REPL threw an exception when trying to bundle assets so StackBlitz reproduction

What is expected?

Both foo.txt and bar.txt should be included in the bundle

What is actually happening?

Only foo.txt is included

System Info

System:
    OS: Linux 6.19 CachyOS Linux
    CPU: (16) x64 AMD Ryzen 7 7840U w/ Radeon(TM) 780M Graphics
    Memory: 6.81 GB / 14.93 GB
    Container: Yes
    Shell: 5.3.9 - /usr/bin/bash
  Binaries:
    Node: 25.7.0 - /home/mary/.local/share/mise/installs/node/25.7.0/bin/node
    npm: 11.10.1 - /home/mary/.local/share/mise/installs/node/25.7.0/bin/npm
    pnpm: 10.30.3 - /home/mary/.local/share/mise/installs/pnpm/10.30.3/pnpm
    bun: 1.3.10 - /home/mary/.local/share/mise/installs/bun/1.3.10/bin/bun
    Deno: 2.7.4 - /home/mary/.local/share/mise/installs/deno/2.7.4/bin/deno
  Browsers:
    Brave Browser: 145.1.87.192

Any additional comments?

Was figuring out why @bokuweb/zstd-wasm wasn't getting bundled properly, turns out it's because of static template literals

https://github.com/bokuweb/zstd-wasm/blob/2dbb091dafa6a869e18fb1586baeb130afa65923/lib/index.web.ts#L3-L8

I think Rolldown should support it because quotes/template literals is a coding style

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions