写了一个通用的scss文件,叫 "main.scss",里面都是一些常用的css,
我现在的引入方式是在每个 .vue 文件主动引入,
如下:
<style lang="sass" scoped>
@import '../../css/main.scss';
</style>
请问有没有什么方式可以一次性引入,比如写普通vue项目时,在index.html直接写入
如:
<style src="../../styles/main.css" scoped></style>
或者:
在哪里直接 import 呢?
用这个
https://github.com/shakacode/sass-resources-loader
加到scss的use配置的数组里。