2016-11-19 74 views

回答

1

我設法讓眼鏡在最近的webpack中使用sass-loader工作。

眼鏡注入了自己的選項青菜,你可以依次傳遞作爲選項SASS裝載機:

[...] 
{ 
    test: /\.scss$/, 
    include: config.paths.assets, 
    use: ExtractTextPlugin.extract({ 
     fallback: 'style', 
     publicPath: '../', 
     use: [ 
     `css?${sourceMapQueryStr}`, 
     'postcss', 
     `resolve-url?${sourceMapQueryStr}`, 
     { 
      loader: `sass?${sourceMapQueryStr}`, 
      options: eyeglass({ 
       // sass options... 
       includePaths: ['/share/scss/'], 
       eyeglass: { 
       // eyeglass options 
       } 
      }) 
     } 
     ], 
    }), 
}, 
[...] 
相關問題