Revert "fix build"

This reverts commit d47dfa868f.
This commit is contained in:
Pavel Murygin 2021-06-16 13:47:29 +03:00
parent 24ca8afb50
commit 5919eca242
4 changed files with 25 additions and 13 deletions

View File

@ -28,7 +28,7 @@ jobs:
node-version: 14 node-version: 14
- run: npm install - run: npm install
- run: npm run prod - run: npm run build
env: env:
CI: true CI: true

BIN
images/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

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

View File

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