diff --git a/client/webpack.common.mjs b/client/webpack.common.mjs index b6d42098..8e913540 100644 --- a/client/webpack.common.mjs +++ b/client/webpack.common.mjs @@ -1,5 +1,4 @@ import path from 'path'; -import HtmlWebpackPlugin from 'html-webpack-plugin'; import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin'; import {ModifySourcePlugin, ConcatOperation} from 'modify-source-webpack-plugin'; import {fileURLToPath} from 'url'; @@ -53,11 +52,6 @@ export default { ], }, plugins: [ - new HtmlWebpackPlugin({ - template: './index.html', - hash: true, - favicon: path.resolve(__dirname, 'public/favicon.ico'), - }), new ForkTsCheckerWebpackPlugin(), new ModifySourcePlugin({ rules: [ diff --git a/client/webpack.dev.mjs b/client/webpack.dev.mjs index 6b86a072..93c4bc00 100644 --- a/client/webpack.dev.mjs +++ b/client/webpack.dev.mjs @@ -5,6 +5,7 @@ import common from './webpack.common.mjs'; import {fileURLToPath} from 'url'; import TerserPlugin from 'terser-webpack-plugin'; import {WebpackManifestPlugin} from 'webpack-manifest-plugin'; +import HtmlWebpackPlugin from 'html-webpack-plugin'; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); @@ -38,6 +39,12 @@ export default merge(common, { new Dotenv({ path: '.env.dev', }), + new HtmlWebpackPlugin({ + template: './index.html', + publicPath, + hash: true, + favicon: path.resolve(__dirname, 'public/favicon.ico'), + }), new WebpackManifestPlugin({ fileName: 'manifest.json', basePath: './dist/', diff --git a/client/webpack.prod.mjs b/client/webpack.prod.mjs index e542fba6..0b49c329 100644 --- a/client/webpack.prod.mjs +++ b/client/webpack.prod.mjs @@ -4,6 +4,7 @@ import Dotenv from 'dotenv-webpack'; import common from './webpack.common.mjs'; import {fileURLToPath} from 'url'; import {sentryWebpackPlugin} from '@sentry/webpack-plugin'; +import HtmlWebpackPlugin from 'html-webpack-plugin'; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); @@ -22,6 +23,11 @@ export default merge(common, { new Dotenv({ path: '.env.prod', }), + new HtmlWebpackPlugin({ + template: './index.html', + hash: true, + favicon: path.resolve(__dirname, 'public/favicon.ico'), + }), sentryWebpackPlugin({ authToken: process.env.SENTRY_AUTH_TOKEN, org: 'wtc-o6',