Skip to content

vite:css plugin output duplicate asset name #10136

@yzydeveloper

Description

@yzydeveloper

Describe the bug

I packaged css as an entry file, and the expected asset name is not as expected, such as duplication caused by chunkName rewriting, plugins/css.ts. is not just css.

For details, see minimal example: vite-css-post-plugin-demo.

Related PR #9485

Reproduction

https://github.com/yzydeveloper/vite-css-post-plugin-demo

System Info

System:
    OS: Windows 10 10.0.19043
    CPU: (4) x64 Intel(R) Core(TM) i5-7300HQ CPU @ 2.50GHz   
    Memory: 3.12 GB / 7.89 GB
  Binaries:
    Node: 16.9.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.11 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 7.22.0 - ~\AppData\Roaming\npm\npm.CMD
  Browsers:
    Chrome: 105.0.5195.102
    Edge: Spartan (44.19041.1266.0), Chromium (105.0.1343.33)
    Internet Explorer: 11.0.19041.1566
  npmPackages:
    @vitejs/plugin-legacy: ^2.0.0 => 2.0.0
    vite: ^3.0.0 => 3.0.4

Used Package Manager

pnpm

Logs

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions