fix: scss文件支持导入其他npm模块中的scss

Change-Id: Idf545b566a669427d9b9be59977a2a281a03b638
This commit is contained in:
wibetter 2022-06-24 11:11:24 +08:00
parent d66addbabc
commit fb2fd70c41
2 changed files with 10 additions and 9 deletions

View File

@ -1,9 +1,6 @@
// @import 'amis-ui/scss/functions';
// @import 'amis-ui/scss/variables';
// @import 'amis-ui/scss/mixins';
@import '../../../node_modules/amis-ui/scss/functions';
@import '../../../node_modules/amis-ui/scss/variables';
@import '../../../node_modules/amis-ui/scss/mixins';
@import 'amis-ui/scss/_functions';
@import 'amis-ui/scss/_variables';
@import 'amis-ui/scss/_mixins';
@import './_mixin';
@import './_variables';
@import './_backTop';

View File

@ -45,9 +45,13 @@ module.exports = {
{
loader: 'sass-loader',
options: {
// `dart-sass` 是首选
implementation: require('sass')
}
implementation: require('sass'), // `dart-sass` 是首选
// webpackImporter: true, // 开启 / 关闭默认的 Webpack importer。默认为true所以不需要额外配置这个
sassOptions: {
// 正常情况下不需要这个配置项但有些情况下需要比如导入的sass文件包含 media queries等
includePaths: ['node_modules', '../../node_modules'],
},
},
}
]
},