webpack.config.js
const path = require("path");
const htmlPlugin = require("html-webpack-plugin");
module.exports = {
entry: "./src/index.js",
output: {
filename: "bundle.js",
path: path.join(__dirname, "dist")
},
plugins: [
new htmlPlugin({
template: "./index.html"
})
],
module: {
rules: [
{
test: /(\.jsx|\.js)$/,
exclude: /node_modules/,
loader: "babel-loader",
options: {
presets: ["env", "react"]
}
},
{
test: /\.css$/,
loader: "style-loader!css-loader"
},
{
test: /\.(png|jpe?g|gif|svg|jpg|gif)(\?.*)?$/,
loader: "url-loader",
options: {
limit: 10000
}</