0👍
I don’t think you can order the way styles are included. But there are a couple of things you can do.
- If you add styles via
import
inApp.js
they will be added first. - You can use
!important
to your css definitions. Ofc this will only work if the initial definitions don’t already have!important
set.
- [Vuejs]-How could I pass values from a file to another in Vue?
- [Vuejs]-Cannot pass the fetch method information to the instance data
0👍
I have yet to try it out, but it seems that CSS Extraction provided by the vue-loader Webpack loader allows extracting the css to an external bundle. Once you have that, you can include it wherever you want on your webpage.
- [Vuejs]-How could I pass values from a file to another in Vue?
- [Vuejs]-Vue // How to point to assets folder from js method?
0👍
I don’t know your application structure but in Vue you can add style for each component in that corresponding component.
TestComponent.vue
<template src='./Test.html'>
</template>
<script>
export default {
}
</script>
<style scoped>
</style>
Source:stackexchange.com