Skip to content

Cannot bundle Vue with <style module> #916

@susnux

Description

@susnux

Reproduction link or steps

https://stackblitz.com/edit/github-jzqgufzy?file=src%2Findex.ts

What is expected?

No error - bundling should work just like in the reproduction when no css module is used.

What is actually happening?

Bundling is not possible:

 ERROR  Error: Build failed with 1 error:

[MISSING_EXPORT] Error: "default" is not exported by "src/TestComponent.vue?vue&type=style&index=0&lang.module.css".
    ╭─[ src/TestComponent.vue:10:8 ]
    │
 10 │ import style0 from "/home/projects/vbwijbmpox.github/src/TestComponent.vue?vue&type=style&index=0&lang.module.css"
    │        ───┬──  
    │           ╰──── Missing export
────╯

    at aggregateBindingErrorsIntoJsError (file:///home/projects/vbwijbmpox.github/node_modules/rolldown/dist/shared/error-w0u7biK-.mjs:67:18)
    at unwrapBindingResult (file:///home/projects/vbwijbmpox.github/node_modules/rolldown/dist/shared/error-w0u7biK-.mjs:37:128)
    at #build (file:///home/projects/vbwijbmpox.github/node_modules/rolldown/dist/shared/rolldown-build-DtGk-m96.mjs:3339:53)

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Priority

    None yet

    Effort

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions