fix favicon optimize webpack config

This commit is contained in:
Pavel Murygin 2021-06-16 13:09:58 +03:00
parent 816a36d1ab
commit 8cb42ed89f
3 changed files with 12 additions and 24 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="favicon" type="image/ico" href="images/favicon.ico" />
<link rel="favicon" type="image/ico" href="favicon.ico" />
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@200;400;500&display=swap" rel="stylesheet">

View File

@ -32,6 +32,16 @@ var common = {
// inject details of output file at end of body
inject: 'body',
}),
new CopyWebpackPlugin({
patterns: [
{
from: './images/*.*',
},
{
from: 'favicon.ico',
},
],
}),
],
resolve: {
modules: [path.join(__dirname, 'src'), 'node_modules'],
@ -126,11 +136,7 @@ if (MODE === 'development') {
});
},
},
plugins: [
new CopyWebpackPlugin({
patterns: [{ from: './images/*.*' }],
}),
],
plugins: [],
});
}
@ -161,14 +167,6 @@ if (MODE === 'production') {
verbose: true,
dry: false,
}),
// Copy static assets
new CopyWebpackPlugin({
patterns: [
{
from: './images/*.*',
},
],
}),
new MiniCssExtractPlugin({
// Options similar to the same options in webpackOptions.output
// both options are optional
@ -187,16 +185,6 @@ if (MODE === 'production') {
},
},
},
// {
// test: /\.css$/,
// exclude: [/elm-stuff/, /node_modules/],
// use: [MiniCssExtractPlugin.loader, 'css-loader?url=false'],
// },
// {
// test: /\.scss$/,
// exclude: [/elm-stuff/, /node_modules/],
// use: [MiniCssExtractPlugin.loader, 'css-loader?url=false', 'sass-loader'],
// },
],
},
});