From 4aaf7ebfed1d0b2c4b249567ae41cec7b3d71503 Mon Sep 17 00:00:00 2001 From: Elie Bariche <33458222+ebariche@users.noreply.github.com> Date: Thu, 7 Sep 2023 08:24:50 -0400 Subject: [PATCH] fix: Ensure filename obfuscation works with obfuscation --- src/Uno.Wasm.Bootstrap/ts/Uno/WebAssembly/Bootstrapper.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Uno.Wasm.Bootstrap/ts/Uno/WebAssembly/Bootstrapper.ts b/src/Uno.Wasm.Bootstrap/ts/Uno/WebAssembly/Bootstrapper.ts index 6611e7934..20065d58e 100644 --- a/src/Uno.Wasm.Bootstrap/ts/Uno/WebAssembly/Bootstrapper.ts +++ b/src/Uno.Wasm.Bootstrap/ts/Uno/WebAssembly/Bootstrapper.ts @@ -436,7 +436,11 @@ namespace Uno.WebAssembly.Bootstrap { } private async deobfuscateFile(asset: string, response: Promise): Promise { - if (this._unoConfig.assemblyObfuscationKey && asset.endsWith(this._unoConfig.assemblyFileExtension)) { + const assemblyFileSuffix = this._unoConfig.assemblyFileNameObfuscationMode !== "NoDots" ? + this._unoConfig.assemblyFileExtension : + this._unoConfig.assemblyFileExtension.replace(".", "_"); + + if (this._unoConfig.assemblyObfuscationKey && asset.endsWith(assemblyFileSuffix)) { const responseValue = await response; if (responseValue) {