I getting erros while trying to bundle my react app.
Uncaught Error: Module build failed (from ./node_modules/css-loader/index.js): ModuleParseError: Module parse failed: Unexpected character ' '
./src/static/css/main.css Module build failed (from ./node_modules/css-loader/index.js): ModuleParseError: Module parse failed: Unexpected character ' '
./src/static/fonts/CHILLER.TTF 1:0 Module parse failed: Unexpected character ' '
var HtmlWebpackPlugin = require('html-webpack-plugin');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
module: {
rules: [
{
test: /\.(png|jp?g|svg)(\?v=\d+\.\d+\.\d+)?$/,
use : [{
loader: 'file-loader',
options: {
name: '[name].[ext]'
}}
]
},
{
test: /\.(woff|woff2|eot|ttf)?$/,
loader: 'file-loader',
options: {
name: "[name].[ext]"
}
},
{
test: /\.css$/,
use: ExtractTextPlugin.extract({
fallback: "style-loader",
use: "css-loader"
})
},
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader'
}
}
]
},
plugins: [
new HtmlWebpackPlugin({
template: './src/index.html',
filename: './index.html'
}),
new ExtractTextPlugin('style.css')
]
}