yibn2008 / fast-sass-loader

High performance sass loader for webpack
250 stars 38 forks source link

Trying to get Fast Sass Loader working #32

Closed poorpaddy closed 6 years ago

poorpaddy commented 6 years ago

I'm using react-static site generator which extends webpack's config. Was hoping you could give me some insight as to what would need to change here to use this loader.

function getStyleLoader (stage) {
  let loader;
  if (stage === 'dev') {
    loader = {
      test: /\.(sc|sa|c)ss$/,
      use: [
        'style-loader',
        {
          loader: 'css-loader',
          options: {
            importLoaders: 2,
            autoprefixer: false,
            minimize: false,
            sourceMap: true
          }
        },
        'sass-loader'
      ]
    };
  } else {
    loader = {
      test: /\.(sc|sa|c)ss$/,
      use: ExtractTextPlugin.extract({
        fallback: 'style-loader',
        use: [
          {
            loader: 'css-loader',
            options: {
              importLoaders: 2,
              autoprefixer: false,
              minimize: true,
              sourceMap: true
            }
          },
          'sass-loader'
        ]
      })
    };
  }
  return loader;
}
yibn2008 commented 6 years ago

any error message ?

poorpaddy commented 6 years ago

No longer relevant