fix prod build

This commit is contained in:
Pavel Murygin 2021-06-17 01:12:07 +03:00
parent a60d370424
commit 34e48a5021

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,6 @@ if (MODE === 'development') {
});
},
},
plugins: [
new CopyWebpackPlugin({
patterns: [{ from: './images/*.*' }],
}),
],
});
}
@ -156,14 +161,6 @@ if (MODE === 'production') {
verbose: true,
dry: false,
}),
// Copy static assets
new CopyWebpackPlugin({
patterns: [
{
from: 'src/assets',
},
],
}),
new MiniCssExtractPlugin({
// Options similar to the same options in webpackOptions.output
// both options are optional
@ -182,16 +179,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'],
},
],
},
});