Skip to content

Commit 61c286e

Browse files
committed
Update SVG sprite generator
1 parent de316b6 commit 61c286e

File tree

3 files changed

+280
-696
lines changed

3 files changed

+280
-696
lines changed

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "webpack-mpa",
3-
"version": "3.11.0",
3+
"version": "3.12.0",
44
"description": "Multi page app setup with webpack",
55
"keywords": [
66
"MPA",
@@ -73,13 +73,12 @@
7373
"postcss-watch-folder": "2.0.0",
7474
"sass": "1.56.0",
7575
"sass-loader": "13.1.0",
76-
"spritesh": "1.2.1",
7776
"stylelint": "14.14.1",
7877
"stylelint-config-recommended": "9.0.0",
7978
"stylelint-config-standard-scss": "6.1.0",
8079
"stylelint-no-unsupported-browser-features": "6.0.1",
8180
"stylelint-scss": "4.3.0",
82-
"svgo": "3.0.0",
81+
"svg-symbol-sprite": "1.1.0",
8382
"webpack": "5.74.0",
8483
"webpack-cli": "4.10.0",
8584
"webpack-shell-plugin-next": "2.3.1",

webpack.config.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,7 @@ const shellScripts = [];
9090
const svgs = readdirSync('./assets/images/svg').filter(svg => svg[0] !== '.');
9191

9292
if (svgs.length) {
93-
shellScripts.push('svgo -f assets/images/svg');
94-
shellScripts.push('spritesh -q -i assets/images/svg -o ./assets/dist/sprite.svg -p svg-');
93+
shellScripts.push('svg-symbol-sprite -i assets/images/svg -o assets/dist/sprite.svg -p svg-');
9594
}
9695

9796
module.exports = (env, argv) => {

0 commit comments

Comments
 (0)