utils.js
// References: https://github.com/vuejs-templates/webpack/issues/149
let sassOptions = {
indentedSyntax: true
}
let scssOptions = {
includePaths: [
'~src/styles'
],
data: '@import "~src/styles/main";'
}
// http://vuejs.github.io/vue-loader/en/configurations/extract-css.html
return {
css: generateLoaders(),
postcss: generateLoaders(),
less: generateLoaders('less'),
sass: generateLoaders('sass', sassOptions),
// Make custom SASS available to all components https://github.com/webpack-contrib/sass-loader
scss: generateLoaders('sass', scssOptions),
stylus: generateLoaders('stylus'),
styl: generateLoaders('stylus')
}