I'm trying to load a global scss using the file "vue.config.js"
vue.config.js
module.exports = {
css: {
loaderOptions: {
sass: {
additionalData: `@import "@/assets/common.scss";`
}
}
}
}
If in my App.vue i open the style tag, with any code, like this:
App.vue
<style lang="scss">
#app{
display: block;
}
</style>
This works, the scss is applied to all the pages, but the problem is, if i don't have the style tag on App.vue the styles will not be applied
If i use import on main.js, i don't need the style tags no App.vue
main.js
import './assets/common.scss'
Why is this happening? It is supposed to work this way? How to make the configs on vue.config.js to work, without need the style tags?