Skip to content

Sourcemap failure on Chrome for Vue 2 components with CSS  #9830

@jfparadis-appomni

Description

@jfparadis-appomni

Describe the bug

When css.devSourcemap is false or unset, Chrome fails to display the mapped source for Vue 2 single file components (SFC) that contain CSS. Note that Safari works as expected.

Some limitation in Chrome? Since the template, the javascript, and the CSS are served separately, it seems that Chrome defaults to showing the CSS.

As a workaround, either:

  • Enablecss.devSourcemap does resolve the problem for Chrome art the cost of a larger payload.
  • Do not declare CSS in SFCs.

Reproduction

https://github.com/jf-paradis/demo-vite-issues

System Info

System:
  Binaries:
    Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node
    npm: 8.11.0 - ~/.nvm/versions/node/v16.16.0/bin/npm
  npmPackages:
    vite: ^3.0.9 => 3.0.9

Used Package Manager

npm

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