Skip to content

Empty css module block should not be ignored #1503

Open
@Astray-git

Description

@Astray-git

Version

15.7.0

Reproduction link

https://codesandbox.io/s/vmlxvlwo4l

Steps to reproduce

  1. edit example/source.vue with an empty css module block
  2. yarn dev

What is expected?

The text "hello" rendered correctly ( as before 15.5.1 ). with warnings in console.
Or, emit a compile error about empty css module block

What is actually happening?

Compiled successfully.
Runtime error in page: Cannot read property 'red' of undefined


Related: #1464 #1496

Possible solutions:

  1. emit error on empty css module block.
  2. generate empty normally ( as before 15.5.1 ), then emit warning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions