File tree Expand file tree Collapse file tree 2 files changed +30
-18
lines changed Expand file tree Collapse file tree 2 files changed +30
-18
lines changed Original file line number Diff line number Diff line change @@ -236,12 +236,36 @@ Generate SVG spritemaps by using [svg-spritemap-webpack-plugin](https://github.c
236236 "sui-bundler" : {
237237 "spritemaps" : [
238238 {
239- "path" : " icons/src/fotocasa/**/*.svg" ,
240- "name" : " fotocasa"
239+ "path" : [" icons/src/fotocasa/**/*.svg" ],
240+ "options" : {
241+ "output" : {
242+ "filename" : " fotocasa.[contenthash].svg" ,
243+ "chunk" : {
244+ "name" : " fotocasa"
245+ }
246+ },
247+ "sprite" : {
248+ "generate" : {
249+ "title" : false
250+ }
251+ }
252+ }
241253 },
242254 {
243- "path" : " icons/src/habitaclia/**/*.svg" ,
244- "name" : " habitaclia"
255+ "path" : [" icons/src/habitaclia/**/*.svg" ],
256+ "options" : {
257+ "output" : {
258+ "filename" : " habitaclia.[contenthash].svg" ,
259+ "chunk" : {
260+ "name" : " habitaclia"
261+ }
262+ },
263+ "sprite" : {
264+ "generate" : {
265+ "title" : false
266+ }
267+ }
268+ }
245269 }
246270 ]
247271 }
Original file line number Diff line number Diff line change @@ -4,20 +4,8 @@ const {config} = require('./config.js')
44const createSVGSpritemapPlugin = ( ) => {
55 const { spritemaps = [ ] } = config
66
7- return spritemaps . map ( ( { path, name} ) => {
8- return new SVGSpritemapPlugin ( [ path ] , {
9- output : {
10- filename : `${ name } .[contenthash].svg` ,
11- chunk : {
12- name
13- }
14- } ,
15- sprite : {
16- generate : {
17- title : false
18- }
19- }
20- } )
7+ return spritemaps . map ( ( { path, options = { } } ) => {
8+ return new SVGSpritemapPlugin ( path , options )
219 } )
2210}
2311
You can’t perform that action at this time.
0 commit comments