amireh / happypack

Happiness in the form of faster webpack build times.
MIT License
4.24k stars 124 forks source link

error with mini-css-extract-plugin #242

Open joebnb opened 6 years ago

joebnb commented 6 years ago

using with happypack it will throw TypeError: Cannot read property 'outputOptions' of undefined

I wonder if you could help me with this problem

this is my webpack config

//plugin
new HappyPack(HappyPackCfg.sass),

module.exports.sass = {
  id: 'sass',
  threadPool: happyThreadPool,
  verbose: false,
  loaders: [loader.cssHot,loader.cssExtract,loader.css, loader.postcss, loader.sass]
};

//rule
{
    test: /\.s[c|a]ss$/,
    use: [ getModulePath('happypack/loader?id=sass')]
  }

//loader
module.exports.sass = {
  id: 'sass',
  threadPool: happyThreadPool,
  verbose: false,
  loaders: [loader.css-hot-loader,loader.mini-css-extract-plugin,loader.css, loader.postcss, loader.sass]
};

image

mini-css-extract-plugin: 0.4.2 webpack:4.18 happypack:5.00

richardsolomou commented 6 years ago

Getting this error as well, similar configuration

joebnb commented 6 years ago

https://github.com/webpack-contrib/mini-css-extract-plugin/issues/273 the same issue in different repo

alienzhou commented 5 years ago

223 maybe the same

huanghanyue commented 5 years ago

get this error as well

Jam1zhu commented 5 years ago

Has this bug been fixed?

AILINGANGEL commented 5 years ago

Got this error as well, have no idea how to fix it

wangdahoo commented 4 years ago

hi guys, any update about this issue?

hallya commented 4 years ago

any news please ?

LaughSun0513 commented 4 years ago

the same

Yang-yu-dong commented 3 years ago

just like this:

{
  test: /.css$/,
  use: [cssLoader, 'happypack/loader?id=css'],
},