Tag: webstorm

使用WebStorm中的Ruby SCSS转换器解决资产位置问题

我有这个SCSS结构: app styles.scss bower_components _colors.scss _fonts.scss sass index.scss styles.scss: @import “sass/index”; index.scss: @import “bower_components/_colors”; @import “bower_components/_fonts”; app文件夹在File Watcher设置中设置为工作目录,在WebStorm中标记为“Resource Root”。 但是,转换失败并出现错误: error sass/index.scss (Line 3: File to import not found or unreadable: bower_components/_colors.) 我读过@import在SCSS中的评估 相对于当前文件位置 相对于根位置 但就我而言,很明显Ruby转换器不会尝试查找相对于根位置的文件。 这是一个错误吗? 或者我做错了什么? 我通过Ruby安装了SCSS并根据https://www.jetbrains.com/help/webstorm/2016.1/transpiling-sass-less-and-scss-to-css.html设置了文件监视器 这是我的文件监视器设置: