Skip to content

assetFileNames does not affect style #9732

@fengxinming

Description

@fengxinming

Describe the bug

This issue has fixed in vite@2.x but it reproduce in vite@3.0.8

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

#4597

System Info

System:
    OS: macOS Mojave 10.14.6
    CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
    Memory: 507.38 MB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 12.18.1 - ~/workspace/github/emsdk/node/12.18.1_64bit/bin/node
    Yarn: 1.22.10 - ~/.nvm/versions/node/v14.15.1/bin/yarn
    npm: 6.14.5 - ~/workspace/github/emsdk/node/12.18.1_64bit/bin/npm
  Browsers:
    Chrome: 104.0.5112.101
    Firefox: 95.0.2
    Safari: 14.1.2

Used Package Manager

npm

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