-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Description
What problem does this feature solve?
In webpack.base.config the @ alias is defined as:
...
resolve: {
extensions: ['.js', '.vue', '.json'],
alias: {
'vue$': 'vue/dist/vue.esm.js',
'@': resolve(src)
}
},
...
But when I use the @ alias in a style tag in a .vue file it doesn't seem to work.
<style lang="scss" scoped>
@import "@/styles/variables";
...
</style>
I get the error
File to import not found or unreadable: @/styles/variables.
PS: I am using a src/styles/_variables.scss file to store sass variables which I am importing in every .vue file. I would love to know if there is some other way of importing the variables file in every component using sass-loader or style-loader.
Thanks
What does the proposed API look like?
<style lang="scss" scoped>
@import "@/styles/variables";
...
</style>
Metadata
Metadata
Assignees
Labels
No labels