diff --git a/webpack.config.js b/webpack.config.js index 32927f0db..dfc423e2a 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -20,7 +20,7 @@ const TerserPlugin = require('terser-webpack-plugin'); const yaml = require('js-yaml'); const postcssPresetEnv = require('postcss-preset-env'); const RemovePlugin = require('remove-files-webpack-plugin'); -const RealFaviconPlugin = require('real-favicon-webpack-plugin'); +const FaviconsWebpackPlugin = require('favicons-webpack-plugin'); const crypto = require('crypto'); const webpackVersion = require('webpack/package.json').version.split('.').slice(0, 2).join('.'); @@ -202,7 +202,7 @@ async function webpackConfig() { console.error(e); } - if (faviconApiVersion) { + /* if (faviconApiVersion) { cacheHash.update(faviconApiVersion); } const versionDigest = cacheHash.digest('hex'); @@ -230,15 +230,18 @@ async function webpackConfig() { ] }) ]; - } else { - const tmpobj = tmp.fileSync({ postfix: ".json" }); - fs.writeSync(tmpobj.fd, JSON.stringify(faviconConfig)); - fs.close(tmpobj.fd); + } else { */ + // const tmpobj = tmp.fileSync({ postfix: ".json" }); + // fs.writeSync(tmpobj.fd, JSON.stringify(faviconConfig)); + // fs.close(tmpobj.fd); return [ - new RealFaviconPlugin({ - faviconJson: path.relative(".", tmpobj.name), + new FaviconsWebpackPlugin({ + logo: './assets/favicon.svg', + // faviconJson: path.relative(".", tmpobj.name), outputPath: path.resolve(__dirname, 'well-known', lang), + prefix: 'assets/', + cache: true, inject: false }), new CopyPlugin({