diff --git a/src/Uno.Wasm.Bootstrap/ShellTask.cs b/src/Uno.Wasm.Bootstrap/ShellTask.cs index d8727693..13df15b4 100644 --- a/src/Uno.Wasm.Bootstrap/ShellTask.cs +++ b/src/Uno.Wasm.Bootstrap/ShellTask.cs @@ -352,9 +352,22 @@ private void ExtractAdditionalJS() { var (fullSourcePath, relativePath) = GetFilePaths(projectResource); - if (fullSourcePath.Contains("WasmScripts")) + string? getPath() { - var scriptName = Path.GetFileName(fullSourcePath); + if (relativePath.Contains(WasmScriptsFolder)) + { + return relativePath; + } + else if (fullSourcePath.Contains(WasmScriptsFolder)) + { + return fullSourcePath; + } + return null; + } + + if (getPath() is { Length: > 0 } path) + { + var scriptName = Path.GetFileName(path); Log.LogMessage($"Embedded resources JS {scriptName}"); @@ -389,7 +402,7 @@ private void ExtractAdditionalCSS() { var (fullSourcePath, relativePath) = GetFilePaths(projectResource); - if (fullSourcePath.Contains("WasmCSS")) + if (relativePath.Contains("WasmCSS") || fullSourcePath.Contains("WasmCSS")) { var cssName = Path.GetFileName(fullSourcePath);