There was an error while loading. Please reload this page.
1 parent d83b6e2 commit e8a0315Copy full SHA for e8a0315
index.js
@@ -48,7 +48,9 @@ class SvgVue {
48
49
{
50
loader: 'svgo-loader',
51
- options: Object.fromEntries(this.options.svgoSettings)
+ options: {
52
+ plugins: this._convertSvgoOptions(this.options.svgoSettings)
53
+ }
54
}
55
]
56
@@ -99,6 +101,23 @@ class SvgVue {
99
101
return false;
100
102
103
104
+ _convertSvgoOptions(options) {
105
+ let converted = [];
106
+
107
+ options.forEach(option => {
108
+ let settings = Object.keys(option);
109
110
+ settings.forEach(setting => {
111
+ converted.push({
112
+ name: setting,
113
+ active: !! option
114
+ });
115
116
117
118
+ return converted;
119
120
121
122
123
mix.extend('svgVue', new SvgVue());
0 commit comments