From 8d56a1d62b5b51713ba9eec8f8aa3ce92ea37406 Mon Sep 17 00:00:00 2001 From: laosb Date: Wed, 20 Aug 2025 21:12:55 +0800 Subject: [PATCH] fix: Specify UTF-8 encoding when reading Tailwind.css file --- Plugins/TailwindCSS/TailwindCSSBuildPlugin.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/TailwindCSS/TailwindCSSBuildPlugin.swift b/Plugins/TailwindCSS/TailwindCSSBuildPlugin.swift index fdf23e1..fb3e4c7 100644 --- a/Plugins/TailwindCSS/TailwindCSSBuildPlugin.swift +++ b/Plugins/TailwindCSS/TailwindCSSBuildPlugin.swift @@ -53,7 +53,7 @@ struct TailwindCSSBuildPlugin: BuildToolPlugin { } let tailwindCSSURL: URL = target.directoryURL.appending(component: "Tailwind.css") - guard let cssContent = try? String(contentsOf: tailwindCSSURL) else { + guard let cssContent = try? String(contentsOf: tailwindCSSURL, encoding: .utf8) else { throw BuildError.missingTailwindCSSFile } let matches = cssContent.matches(of: importStatementRegex)