-
Notifications
You must be signed in to change notification settings - Fork 920
Closed
Description
Hello
Let's assume the following components :
// Vue DevTools would show :
<Root>
<SubRoot>
<EndOfTree>
// Component Root
<template>
<div class=".root-css">
<sub-root></sub-root>
</div>
</template>
<script>
import SubRoot from './SubRoot.vue'
export default {
name: 'Root',
components: { SubRoot }
}
</script>
<style>.root-css { background-color: blue }</style> // <--- CSS Specific to this component
// Component SubRoot
<template>
<div class=".sub-root-css">
<end-of-tree-css></end-of-tree-css>
</div>
</template>
<script>
import EndOfTree from './EndOfTree.vue'
export default {
name: 'SubRoot',
components: { EndOfTree }
}
</script>
<style>.sub-root-css { background-color: red }</style> // <--- CSS Specific to this component
// Component EndOfTree
<template>
<div class=".end-of-tree-css">EndOfTree</div>
</template>
<script>
export default {
name: 'EndOfTree',
}
</script>
<style>.end-of-tree-css { background-color: green }</style> // <--- CSS Specific to this component
The issue : the production build contains the extracted css of all components in the wrong order.
Output CSS file is :
- EndOfTree CSS
- SubRoot CSS
- Root CSS
Desired ouput CSS file :
- Root CSS
- SubRoot CSS
- EndOfTree CSS
This is especially annoying if I have some reset CSS on the root component.
Note : I use vuejs-templates/webpack and vuejs/vue-router
Metadata
Metadata
Assignees
Labels
No labels