Skip to content

css modules link with template render is missing in production mode when project depends on a package that is not transpilered in node_modules #8182

@Itarn

Description

@Itarn

Describe the bug

when I run vite build, in dist files, css modules link with template render is missing. The project use vue component package that is not been transpilered (In the following examples, the package is unbuildvue3module).

While it is work in dev.

This is CSS files. _red_xad9b_2 is from package. But the vaiables has not been found in JS files.

20220515114313

Thx very much

Reproduction

https://stackblitz.com/edit/vitejs-vite-39fnes

System Info

"unbuildvue3module": "^1.0.0"
"vue": "^3.2.33"
"@vitejs/plugin-vue": "^2.3.2"
"vite": "^2.9.8"

Used Package Manager

pnpm or npm

Logs

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions