Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion e2e/2.x/style/components/Less.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
<template>
<div />
<div>
<div :class="$style.a">a</div>
<div :class="$style.b">b</div>
<div :class="$style.c">c</div>
<div :class="$style.d">d</div>
</div>
</template>

<style module lang="less">
@import './styles/less-a.less';
.a {
background-color: @primary-color;
}
.b {
color: @primary-color;
}
</style>
7 changes: 7 additions & 0 deletions e2e/2.x/style/components/styles/less-a.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@import "variables";
.c {
color: @primary-color;
}
.d {
background-color: @primary-color;
}
2 changes: 1 addition & 1 deletion packages/vue2-jest/lib/process-style.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function getPreprocessOptions(lang, filePath, jestConfig) {
})
}
}
if (lang === 'styl' || lang === 'stylus') {
if (lang === 'styl' || lang === 'stylus' || lang === 'less') {
return {
paths: [path.dirname(filePath), process.cwd()]
}
Expand Down