Skip to content

assetFileNames does not affect style #4597

@fengxinming

Description

@fengxinming

Describe the bug

expect to output assets/index.css after building, but assets/style.css is created, the config is below:

{
    build: {
      cssCodeSplit: false,
      rollupOptions: {
        output: {
          manualChunks: undefined,
          assetFileNames: 'assets/[name][extname]',
          entryFileNames: 'assets/[name].js',
          format: 'iife'
        }
      }
    }
}

Reproduction

https://github.com/fengxinming/vite-plugins/tree/main/examples/demo

System Info

System:
   OS: Windows 7 6.1.7601
   CPU: (4) x64 AMD A10-7800 Radeon R7, 12 Compute Cores 4C+8G
   Memory: 2.78 GB / 6.96 GB
 Binaries:
   Node: 12.18.1 - C:\Program Files\nodejs\node.EXE
   Yarn: 1.22.10 - ~\AppData\Roaming\npm\yarn.CMD
   npm: 6.14.4 - C:\Program Files\nodejs\npm.CMD
 Browsers:
   Chrome: 91.0.4472.164
   Internet Explorer: 9.0.8112.16737

Used Package Manager

pnpm

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