Skip to content

HMR broken when using css module with src #899

@Allenice

Description

@Allenice

Version

13.0.2

Reproduction link

https://github.com/MMF-FE/vue-typescript/tree/develop/example

Steps to reproduce

add vue component like this

<template>
    <div :class="$style.viewHome">
        <h1>Hello</h1>
    </div>
</template>

<style src="./home.scss" lang="scss" module></style>
.view-home {
  color: red;
}

change the color

.view-home {
  color: green;
}

What is expected?

When I change the text color, It should hot reload.

What is actually happening?

HMR not work


When I use inline style, HMR work.

<template>
    <div :class="$style.viewHome">
        <hello name="Vue-Typescript"></hello>
        <router-link to="product">Product</router-link>
    </div>
</template>

<style lang="scss" module>
  .view-home {
    color: red;
  }
</style>

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