12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- const path = require("path");
- const HtmlWebpackPlugin = require("html-webpack-plugin");
- module.exports = {
- mode: "production",
-
-
- entry: ["./src/a.js", "./src/b.js"],
-
-
-
-
- output: {
-
-
- clean: true,
- },
- module: {
- rules: [
- {
- test: /\.css$/i,
- use: ["style-loader", "css-loader"],
- },
- {
-
-
- test: /\.(png|svg|jpg|jpeg|gif)$/i,
- type: "asset/resource",
- },
- {
- test: /\.m?js$/,
- exclude: /(node_modules|bower_components)/,
- use: {
- loader: "babel-loader",
- options: {
- presets: ["@babel/preset-env"],
- },
- },
- },
- ],
- },
- plugins: [new HtmlWebpackPlugin({title:"你好啊1"})],
- devtool:"inline-source-map"
- };
|