36 lines
644 B
JavaScript
36 lines
644 B
JavaScript
const path = require("path");
|
|
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
|
|
|
module.exports = {
|
|
entry: "./src/index.js",
|
|
output: {
|
|
filename: "main.js",
|
|
path: path.resolve(__dirname, "dist"),
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.(js|jsx)$/,
|
|
exclude: /node_modules/,
|
|
use: "babel-loader",
|
|
},
|
|
{
|
|
test: /\css$/,
|
|
use: [
|
|
{
|
|
loader: "style-loader",
|
|
},
|
|
{
|
|
loader: "css-loader",
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
plugins: [
|
|
new HtmlWebpackPlugin({
|
|
template: "./src/index.html",
|
|
}),
|
|
],
|
|
};
|