From 608ac42e34e36e0ac47e43e4b6c8d506bfa02735 Mon Sep 17 00:00:00 2001 From: Guti <32563288+TheCaramelion@users.noreply.github.com> Date: Wed, 30 Apr 2025 22:34:54 +0200 Subject: [PATCH] Manually ports Virgo's #17642 (#10813) --- tgui/rspack.config-dev.cjs | 12 +++++++----- tgui/rspack.config.cjs | 20 ++++++++++++-------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/tgui/rspack.config-dev.cjs b/tgui/rspack.config-dev.cjs index adb274affc..6044ef5a22 100644 --- a/tgui/rspack.config-dev.cjs +++ b/tgui/rspack.config-dev.cjs @@ -65,12 +65,7 @@ module.exports = (env = {}, argv) => { }, { loader: require.resolve('css-loader'), - }, - { - loader: require.resolve('sass-loader'), options: { - api: 'modern-compiler', - implementation: 'sass-embedded', url: { filter: (url, resourcePath) => { if (url.includes('.ttf')) { @@ -81,6 +76,13 @@ module.exports = (env = {}, argv) => { }, }, }, + { + loader: require.resolve('sass-loader'), + options: { + api: 'modern-compiler', + implementation: 'sass-embedded', + }, + }, ], type: 'javascript/auto', }, diff --git a/tgui/rspack.config.cjs b/tgui/rspack.config.cjs index 13dcc57a5e..b6e24c436f 100644 --- a/tgui/rspack.config.cjs +++ b/tgui/rspack.config.cjs @@ -72,6 +72,18 @@ module.exports = (env = {}, argv) => { }, }, module: { + parser: { + css: { + url: { + filter: (url, resourcePath) => { + if (url.includes('.ttf')) { + return false; + } + return true; + }, + }, + }, + }, rules: [ { test: /\.([tj]s(x)?|cjs)$/, @@ -103,14 +115,6 @@ module.exports = (env = {}, argv) => { options: { api: 'modern-compiler', implementation: 'sass-embedded', - url: { - filter: (url, resourcePath) => { - if (url.includes('.ttf')) { - return false; - } - return true; - }, - }, }, }, ],