common.scss is introduced globally in vue projects, and globally defined scss variables and mixin cannot be used in header components
common.csss:
$color_active:-sharp4381E6;
header.vue:
.cp_header{
background: $color_active;
}
common.scss is introduced globally in vue projects, and globally defined scss variables and mixin cannot be used in header components
common.csss:
$color_active:-sharp4381E6;
header.vue:
.cp_header{
background: $color_active;
}
style
tag scoped
this problem occurs
you need to configure sass-resources-loader
npm install sass-resources-loader-- save-dev
utils.js
scss: generateLoaders('sass').concat(
{
loader: 'sass-resources-loader',
options: {
resources: path.resolve(__dirname, '../src/assets/xxxx.scss')
}
}
)
1. The file structure directory is as follows: index.scss@importscssicon.scssfonts: main.jsindex.scss : ask the great god to help solve it? Compare heart to heart ...
sass-loader,scss-loader,node-loader,webpack.base.conf.jsmodulerules for correction, thank you ...
as shown in figure scss ...
it is not wrong to add before each line ...
the cause of the problem recently, when you set up a npm private server, it was no problem to download the project dependency package locally, but you will fail to install node-sass on the server. Although cnpm can be used to solve the problem, privat...
because px2rem is used, 1px will be converted into 0.00000xxxrem . Many browsers cannot recognize it, so they can only use 1Px instead of 1px . But when formatting a document, Vetur converts 1Px into 1px . Checked the documentation of the tw...