Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
mhdeeb committed Jul 3, 2024
1 parent 4dc7884 commit 98d9302
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");
// const CompressionWebpackPlugin = require("compression-webpack-plugin");

const isDev = process.env.npm_lifecycle_event === "dev";

module.exports = {
mode: "production",
entry: { bundle: path.resolve(__dirname, "src", "js", "index.tsx") },
output: {
path: path.resolve(__dirname, "docs"),
// publicPath: "/",
publicPath: isDev ? "/" : "auto",
filename: "[contenthash].js",
clean: true,
assetModuleFilename: "[name][ext]",
Expand Down

0 comments on commit 98d9302

Please sign in to comment.