Fix webpack reload infinite loop

This commit is contained in:
Andras Schmelczer 2022-01-24 23:14:24 +01:00
parent b8e829c962
commit 2eff310a77
No known key found for this signature in database
GPG key ID: 39260B5B0614A13E

View file

@ -29,14 +29,15 @@ module.exports = (env, argv) => ({
template: './src/index.html',
}),
new MiniCssExtractPlugin(),
new InlineSourceWebpackPlugin({
compress: true,
}),
argv.mode === 'production'
? new InlineSourceWebpackPlugin({
compress: true,
})
: null,
new webpack.DefinePlugin({
__CURRENT_DATE__: Date.now(),
}),
],
].filter(Boolean),
module: {
rules: [
{
@ -105,9 +106,7 @@ module.exports = (env, argv) => ({
{
test: /\.ts$/,
use: [
{
loader: 'ts-loader',
},
'ts-loader',
{
// for removing whitespace from template strings
loader: 'string-replace-loader',