Fix webpack reload infinite loop
This commit is contained in:
parent
b8e829c962
commit
2eff310a77
1 changed files with 7 additions and 8 deletions
|
|
@ -29,14 +29,15 @@ module.exports = (env, argv) => ({
|
||||||
template: './src/index.html',
|
template: './src/index.html',
|
||||||
}),
|
}),
|
||||||
new MiniCssExtractPlugin(),
|
new MiniCssExtractPlugin(),
|
||||||
new InlineSourceWebpackPlugin({
|
argv.mode === 'production'
|
||||||
compress: true,
|
? new InlineSourceWebpackPlugin({
|
||||||
}),
|
compress: true,
|
||||||
|
})
|
||||||
|
: null,
|
||||||
new webpack.DefinePlugin({
|
new webpack.DefinePlugin({
|
||||||
__CURRENT_DATE__: Date.now(),
|
__CURRENT_DATE__: Date.now(),
|
||||||
}),
|
}),
|
||||||
],
|
].filter(Boolean),
|
||||||
|
|
||||||
module: {
|
module: {
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
|
|
@ -105,9 +106,7 @@ module.exports = (env, argv) => ({
|
||||||
{
|
{
|
||||||
test: /\.ts$/,
|
test: /\.ts$/,
|
||||||
use: [
|
use: [
|
||||||
{
|
'ts-loader',
|
||||||
loader: 'ts-loader',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
// for removing whitespace from template strings
|
// for removing whitespace from template strings
|
||||||
loader: 'string-replace-loader',
|
loader: 'string-replace-loader',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue