我的 webpack.config.js
const path = require("path");
const webpack = require("webpack");
const CopyWebpackPlugin = require("copy-webpack-plugin");
const googleConfig = require("./google.config.json");
module.exports = (env, args) => {
const evnConfig = require("./config.json")[args.mode];
const timestamp = Date.now();
return {
entry: {
main: "./front-end/index.js",
rightpanel: "./front-end/rightPanelIndex.js",
worklogs: "./front-end/worklogsIndex.js",
leftpanel: "./front-end/leftPanelIndex.js",
timelog: "./front-end/timelogIndex.js",
confirm: "./front-end/confirmIndex.js",
},
output: {
path: path.resolve(__dirname, "public"),
filename: `js/[name].bundle.js`,
},
stats: { warnings: false },
resolve: {
extensions: [".js", ".jsx", ".json"],
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: { …Run Code Online (Sandbox Code Playgroud)