happypack icon indicating copy to clipboard operation
happypack copied to clipboard

not support SASS-LOADER implementation

Open weilinzung opened this issue 5 years ago • 4 comments

{
    loader: 'sass-loader', 
    options: {
      sourceMap: true,
      implementation: require('sass'),
    }
}

Module build failed (from ../node_modules/sass-loader/lib/loader.js):
TypeError: Cannot read property 'bind' of undefined
    at getRenderFuncFromSassImpl (.../node_modules/sass-loader/lib/loader.js:105:30)
    at Object.sassLoader (.../node_modules/sass-loader/lib/loader.js:46:20)

weilinzung avatar Jun 09 '19 11:06 weilinzung

  • Operating System: MAC OSX 10.14.6
  • Node Version: 12.9.1
  • NPM Version: 6.11.2
  • webpack Version: 4.39.3
  • sass-loader Version: 8.0.0

Expected Behavior

sass-loader 7.3.1 work correct!

build success as sass-loader 7.3.1 version with mini-css-extract-plugin && HappyPack

Actual Behavior

get Error working with mini-css-extract-plugin and HappyPack

Code

webpack mode production

// webpack.config.js
   // use loader
      {
        test: /\.(css|scss)$/,
        use: [
          MiniCssExtractPlugin.loader,
          require.resolve('happypack/loader') + '?id=scss',
        ],
      }

// HappyPack
    new HappyPack({
      id: 'scss',
      threadPool: HappyThreadPool,
      loaders: [
            {
              loader: require.resolve('css-loader'),
              options: {
                sourceMap: true,
                modules: abcJSON.css ? !!abcJSON.css.modules : false,
                importLoaders: 2,
              },
            },
            {
              loader: require.resolve('postcss-loader'),
              options: {
                sourceMap: 'inline',
                config: {
                  path: path.join(__dirname, '/'),
                },
              },
            },
       {
          loader: require.resolve('resolve-url-loader'),
          options: {
            sourceMap: true,
          },
        },
        {
          loader: require.resolve('sass-loader'),
          options: {
            sourceMap: true
          },
        },
      ],
    }),
Screen Shot 2019-08-30 at 1 14 08 PM

DemonCloud avatar Aug 30 '19 16:08 DemonCloud

I have the same problem, Can anyone fix it?

shinelp100 avatar Apr 25 '20 14:04 shinelp100

have you fixed it?

webfrontzhifei avatar Dec 31 '20 08:12 webfrontzhifei

I encountered this problem, upgrade Vue-loader vue template-compiler version

sujianqingfeng avatar Aug 18 '22 11:08 sujianqingfeng