Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sass配置 为什么引入的时候还是报错没有配置 #1440

Closed
weiweiyx opened this issue Jan 5, 2018 · 4 comments
Closed

sass配置 为什么引入的时候还是报错没有配置 #1440

weiweiyx opened this issue Jan 5, 2018 · 4 comments

Comments

@weiweiyx
Copy link

weiweiyx commented Jan 5, 2018

在webpack里面配置了
webpackConfig.module.rules.push({
test: /.module.sass$/,
use: path.join(path.dirname(require.resolve('extract-text-webpack-plugin')), 'loader.js') + 'postcss-loader!'+ 'sass-loader'
});
webpackConfig.module.rules.forEach(function(use, index) {
if (typeof use.test === 'function' && use.test.toString().indexOf('\.sass$') > -1) {
use.include = /node_modules/;
use.test = /.sass$/;
}
});
启动之后引入sass文件还是报错
应该怎么配置呢

@sorrycc
Copy link
Member

sorrycc commented Jan 5, 2018

升级到 roadhog@2,然后参考 https://github.com/sorrycc/roadhog#sass

@sorrycc sorrycc closed this as completed Jan 5, 2018
@zhenxianluo
Copy link

您好,roadhog2中.webpackrc文件可以配置sass,找了好久没有看到一个示例

@zhantewei2
Copy link

@sorrycc 能否给一个配置sass的示例

@junehunter
Copy link

@sorrycc 能否给一个配置sass的示例

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants