我正在尝试为在webpack和PostCSS上运行的应用程序加载scss样式表。
不幸的是,我收到以下错误
(Emitted value instead of an instance of Error) postcss-import: .../file.scss:2:1: Cannot find module 'compass' from '../scss'
我已经从npm安装了指南针。
这是我的网站设置:
{
test: /\.s(a|c)ss$/,
use: ['babel-loader', 'raw-loader','postcss-loader',
{ loader: 'sass-resources-loader',
options: {
resources: ['./styles/scss/file.scss','./styles/scss/anotherFile.scss']
}
}
我的PostCSS配置
module.exports = {
plugins: [
require('postcss-easy-import')({prefix: '_'}), // keep this first
require('autoprefixer')({ /* ...options */ }), // so imports are
]
}
那么有什么建议可以帮助我吗?