build bunch of fixes

This commit is contained in:
Olivier Gagnon
2021-09-21 20:30:00 -04:00
parent c94ec2f170
commit 0c932dd4d1
24 changed files with 553 additions and 1075 deletions
+5
View File
@@ -6,6 +6,7 @@ const HtmlWebpackPlugin = require("html-webpack-plugin");
const ForkTsCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin");
const UnusedWebpackPlugin = require("unused-webpack-plugin");
const ReactRefreshWebpackPlugin = require("@pmmmwh/react-refresh-webpack-plugin");
const DeadCodePlugin = require("webpack-deadcode-plugin");
module.exports = (env, argv) => {
const isDevServer = (env || {}).devServer === true;
@@ -130,6 +131,10 @@ module.exports = (env, argv) => {
module: true,
}),
isDevelopment && new ReactRefreshWebpackPlugin(),
new DeadCodePlugin({
patterns: ["src/**/*.(js|jsx|css|ts|tsx)"],
exclude: ["**/*.(stories|spec).(js|jsx)"],
}),
].filter(Boolean),
target: "web",
entry: entry,