After I installed the extract-text-webpack-plugin it started to return me the error erro [1] "loader" must be a string
Follow my webpack configuration
'use strict'
const path = require('path')
const webpack = require('webpack')
const validate = require('webpack-validator')
const HtmlPlugin = require('html-webpack-plugin')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
module.exports = validate({
devtool: 'source-map',
entry: [
'react-hot-loader/patch',
'webpack-dev-server/client?http://localhost:3000',
'webpack/hot/only-dev-server',
path.join(__dirname, 'src', 'index')
],
output: {
path: path.join(__dirname, 'dist'),
filename: '[name]-[hash].js',
publicPath: ''
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new ExtractTextPlugin('[name]-[hash].css'),
new HtmlPlugin({
title: 'GitHub app',
template: path.join(__dirname, 'src', 'html', 'template.html')
})
],
module: {
preLoaders: [{
test: /\.js$/,
exclude: /node_modules/,
loader: 'standard'
}],
loaders: [{
test: /\.js$/,
exclude: /node_modules/,
include: /src/,
loader: 'babel'
}, {
test: /\.css$/,
exclude: /node_modules/,
include: /src/,
loader: ExtractTextPlugin.extract('style', 'css')
}]
}
})
I'll leave the repository link