Fix svgo config deprecation
This commit is contained in:
parent
16ecfd112f
commit
de6d4b7e7f
@ -1,7 +1,6 @@
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||||
const ImageMinimizerPlugin = require("image-minimizer-webpack-plugin");
|
const ImageMinimizerPlugin = require("image-minimizer-webpack-plugin");
|
||||||
const { extendDefaultPlugins } = require("svgo");
|
|
||||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||||
|
|
||||||
const dev = process.env.NODE_ENV === 'development';
|
const dev = process.env.NODE_ENV === 'development';
|
||||||
@ -94,18 +93,21 @@ const config = {
|
|||||||
[
|
[
|
||||||
"svgo",
|
"svgo",
|
||||||
{
|
{
|
||||||
plugins: extendDefaultPlugins([
|
plugins: {
|
||||||
{
|
name: 'preset-default',
|
||||||
name: "removeViewBox",
|
params: {
|
||||||
active: false,
|
overrides: {
|
||||||
},
|
removeViewBox: {
|
||||||
{
|
active: false,
|
||||||
name: "addAttributesToSVGElement",
|
},
|
||||||
params: {
|
addAttributesToSVGElement: {
|
||||||
attributes: [{ xmlns: "http://www.w3.org/2000/svg" }],
|
params: {
|
||||||
|
attributes: [{xmlns: "http://www.w3.org/2000/svg"}],
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
]),
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
Loading…
Reference in New Issue
Block a user