2024-02-20 20:12:56 +00:00
|
|
|
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
entry: "./src/main.js",
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.css$/i,
|
2024-02-23 12:56:10 +00:00
|
|
|
use: ["style-loader", "css-loader", "postcss-loader"],
|
2024-02-20 20:12:56 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.(png|gif|jpe?g|webp|svg)$/i,
|
|
|
|
type: "asset",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.(woff|woff2|otf|ttf|eot)$/i,
|
|
|
|
type: "asset/resource",
|
|
|
|
},
|
2024-02-24 17:33:22 +00:00
|
|
|
{
|
|
|
|
test: /\.(?:js|mjs|cjs)$/,
|
|
|
|
exclude: /node_modules/,
|
|
|
|
use: {
|
|
|
|
loader: "babel-loader",
|
|
|
|
options: {
|
|
|
|
presets: [["@babel/preset-env", { targets: "defaults" }]],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2024-02-20 20:12:56 +00:00
|
|
|
],
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
new HtmlWebpackPlugin({
|
|
|
|
template: "./src/index.html",
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
};
|