I can\'t figure what is the proper loader to load images in ReactJS webpack,
May you give me a hand? I get this error:
Module parse failed: /Users/im
You can use file-loader. You need to install it first using npm and then edit your webpack config like this
module: {
// apply loaders to files that meet given conditions
loaders: [{
test: /\.jsx?$/,
include: path.join(__dirname, '/client/src'),
loader: 'babel-loader',
query: {
presets: ["react", "es2015", "stage-1"]
}
},
{
test: /\.(gif|svg|jpg|png)$/,
loader: "file-loader",
}],
},