Skip to content

vue-loader v15版本打包时在::v-deep { ... } 中写多行注释时webpack5编译时会报 Module build failed (from . /node modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js):; TypeError: Cannot read properties of undefined (reading 'spaces") at /users/xxx/xxx/example.scss:15:1错误 #2043

Open
@JacksonGao188

Description

@JacksonGao188

// for example, file name is demo.scss
::v-deep {
/* 多行注释 */
.some-class-name {
color: red;
}
}
当你将这个多行注释改为单行注释则编译通过不报错

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