From a82062da5b7903d4b9f82f4abd02e5daf4a30436 Mon Sep 17 00:00:00 2001 From: Ajay Date: Fri, 14 Jan 2022 16:07:24 -0500 Subject: Add build mode for edge languages --- webpack/webpack.common.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'webpack') diff --git a/webpack/webpack.common.js b/webpack/webpack.common.js index 7f0d64ac..cacb07ba 100644 --- a/webpack/webpack.common.js +++ b/webpack/webpack.common.js @@ -5,6 +5,22 @@ const BuildManifest = require('./webpack.manifest'); const srcDir = '../src/'; const fs = require("fs"); +const edgeLanguages = [ + "de", + "en", + "es", + "fr", + "pl", + "pt_BR", + "ro", + "ru", + "sk", + "sv", + "tr", + "uk", + "zh_CN" +] + module.exports = env => ({ entry: { popup: path.join(__dirname, srcDir + 'popup.ts'), @@ -49,6 +65,11 @@ module.exports = env => ({ context: './public', filter: async (path) => { if (path.match(/\/_locales\/.+/)) { + if (env.browser.toLowerCase() === "edge" + && !edgeLanguages.includes(path.match(/(?<=\/_locales\/)[^/]+(?=\/[^/]+$)/)[0])) { + return false; + } + const data = await fs.promises.readFile(path); const parsed = JSON.parse(data.toString()); -- cgit v1.2.3