diff --git a/webpack.config.js b/webpack.config.js index eb65e332f..637c25461 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -7,7 +7,7 @@ import path from 'path'; import tmp from 'tmp'; tmp.setGracefulCleanup(); import fs from 'fs-extra'; -import { glob } from 'glob'; +import { glob, globSync } from 'glob'; import execSync from 'child_process'; import axios from 'axios'; @@ -246,7 +246,7 @@ async function webpackConfig() { ] }), { apply: compiler => compiler.hooks.afterEmit.tap('AfterEmitPlugin', compilation => { - const imgFiles = glob.sync(path.resolve('well-known', lang, '*.@(png)')); + const imgFiles = globSync(path.resolve('well-known', lang) + '/*.@(png)'); const imgFilesArgs = Array.from(imgFiles).join(" "); execSync(`exiftool -overwrite_original -all= ${imgFilesArgs}`, { stdio: 'inherit' }); })