From edab973fa34a15bf396a7714351d16499c9d9c0e Mon Sep 17 00:00:00 2001 From: silverwind Date: Fri, 1 Sep 2023 15:52:40 +0200 Subject: [PATCH 1/2] Use case-insensitive regex for all webpack assets --- webpack.config.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 95749611162eb..a48f1e46e4638 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -117,12 +117,12 @@ export default { module: { rules: [ { - test: /\.vue$/, + test: /\.vue$/i, exclude: /node_modules/, loader: 'vue-loader', }, { - test: /\.js$/, + test: /\.js$/i, exclude: /node_modules/, use: [ { @@ -151,12 +151,12 @@ export default { ], }, { - test: /\.svg$/, + test: /\.svg$/i, include: fileURLToPath(new URL('public/assets/img/svg', import.meta.url)), type: 'asset/source', }, { - test: /\.(ttf|woff2?)$/, + test: /\.(ttf|woff2?)$/i, type: 'asset/resource', generator: { filename: 'fonts/[name].[contenthash:8][ext]', From 1eff1a8111882fbb18e488f459c905533636b6b3 Mon Sep 17 00:00:00 2001 From: silverwind Date: Fri, 1 Sep 2023 15:55:10 +0200 Subject: [PATCH 2/2] more i --- webpack.config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index a48f1e46e4638..497aca9224c75 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -41,10 +41,10 @@ const filterCssImport = (url, ...args) => { if (cssFile.includes('fomantic')) { if (/brand-icons/.test(importedFile)) return false; - if (/(eot|ttf|otf|woff|svg)$/.test(importedFile)) return false; + if (/(eot|ttf|otf|woff|svg)$/i.test(importedFile)) return false; } - if (cssFile.includes('katex') && /(ttf|woff)$/.test(importedFile)) { + if (cssFile.includes('katex') && /(ttf|woff)$/i.test(importedFile)) { return false; }