Skip to content

Commit

Permalink
Merge pull request #1825 from area17/2x-custom-icons
Browse files Browse the repository at this point in the history
[2.x] Backport of icons missing fix.
  • Loading branch information
haringsrob authored Sep 30, 2022
2 parents 31b01e4 + 913d33c commit dea14e1
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,7 @@ const plugins = [
})
]

function isDirEmpty(dirname) {
return fs.promises.readdir(dirname).then(files => {
return files.length === 0;
});
}

if (!isDirEmpty(`${srcDirectory}/icons-custom/`)) {
if (fs.existsSync(`${srcDirectory}/icons-custom`) && fs.readdirSync(`${srcDirectory}/icons-custom`).length !== 0) {
plugins.push(new SVGSpritemapPlugin(`${srcDirectory}/icons-custom/**/*.svg`, svgConfig('custom')));
}

Expand Down

0 comments on commit dea14e1

Please sign in to comment.