These are chat archives for QingWei-Li/cooking

30th
Jun 2016
kokoro
@kokoroX
Jun 30 2016 01:53
cooking.add('loader.css', {
  test: /\.css$/,
  loader: ExtractTextPlugin.extract('style-loader', 'css-loader!autoprefixer-loader')
});

cooking.add('loader.css', {
  test: /\.css$/,
  loader: ExtractTextPlugin.extract('style-loader', 'css-loader!autoprefixer-loader')
});

cooking.add('plugin.extractText', new ExtractTextPlugin('[name].css'));
@QingWei-Li 解决了 不过多问个问题可以吗🤔cooking不是自带ExtractText插件吗 为啥我不写plugin.extractText会报错
要区分大小写 应该是 plugin.ExtractText
kokoro
@kokoroX
Jun 30 2016 03:18
@QingWei-Li 需要自己覆盖ExtractText吗?
cinwell.li
@QingWei-Li
Jun 30 2016 03:18
是的
或者你其实不用配置的呀
kokoro
@kokoroX
Jun 30 2016 03:22
@QingWei-Li 不配置报错
    ERROR in ./~/normalize.css/normalize.css
    Module build failed: Error: "extract-text-webpack-plugin" loader is used without the corresponding plugin, refer to https://github.com/webpack/extract-text-webpack-plugin for the usage example
        at Object.module.exports.pitch (/usr/local/lib/node_modules/cooking/node_modules/extract-text-webpack-plugin/loader.js:21:9)
     @ ./packages/style/index.js 3:0-38
cinwell.li
@QingWei-Li
Jun 30 2016 03:28
不对劲
哦 没事。。