Skip to content

something is wrong with building when using '?inline' with css  #5348

@lovetingyuan

Description

@lovetingyuan

Describe the bug

import('./style.css?inline') will create a css code split bundle, but for building, the css bundle will turn to a useless js bundle, that is to say, the css code is gone.

Reproduction

https://github.com/lovetingyuan/bug-vite-dymamic-import-css

System Info

System:
    OS: macOS 10.15.7
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 2.68 GB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.18.4 - /usr/local/bin/node
    Yarn: 1.22.5 - /usr/local/bin/yarn
    npm: 6.14.6 - /usr/local/bin/npm
  Browsers:
    Chrome: 94.0.4606.81
    Edge: 94.0.992.50
    Firefox: 93.0
    Safari: 14.0

Used Package Manager

yarn

Logs

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    feat: cssp3-minor-bugAn edge case that only affects very specific usage (priority)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions