Closed
Description
version
- 2.x
- @vue/cli-service@^3.7.0
Environment info
Different behavior with same code
Steps to reproduce
vue create vue-project-v4
vue init vue-project-v3
// hello-world.vue
<template>
<div class="test-find">
<h1>test-find cli@3</h1>
<x-span></x-span>
</div>
</template>
<script>
import xSpan from './x-span.vue'
export default {
components: {
xSpan
}
}
</script>
<style lang="less">
.test-span {
color: green;
}
</style>
// x-span.vue
<template>
<div class="x-span">
<h1 class="test-span">hello world</h1>
</div>
</template>
<script>
export default {
name: 'x-span'
}
</script>
<style lang="less">
.test-span {
color: blue;
}
</style>
What is expected?
both hello world
has same color style
What is actually happening?
in v4 the hello world
color is green
in v3 the hello world
color is blue
Metadata
Metadata
Assignees
Labels
No labels