This is an automated email from the ASF dual-hosted git repository.

joshtynjala pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git

commit 88ccbfd6bc819dbc03a6aab7c2d86ad93ab54ffb
Author: Josh Tynjala <[email protected]>
AuthorDate: Tue Jan 21 14:37:16 2025 -0800

    MXMLRoyalePublisher: don't add <link> tag for CSS if the .css file has not 
been emitted
---
 .../codegen/mxml/royale/MXMLRoyalePublisher.java         | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git 
a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyalePublisher.java
 
b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyalePublisher.java
index 0c348511f..41404d415 100644
--- 
a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyalePublisher.java
+++ 
b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyalePublisher.java
@@ -1031,11 +1031,17 @@ public class MXMLRoyalePublisher extends JSPublisher 
implements IJSRoyalePublish
         htmlFile.append("\t<meta http-equiv=\"X-UA-Compatible\" 
content=\"IE=edge,chrome=1\">\n");
         htmlFile.append("\t<meta http-equiv=\"Content-Type\" 
content=\"text/html; charset=utf-8\">\n");
         
-        // if release version want to call minified css file, while in debug 
the non minified one
-        if (type.equals("release")) {
-            htmlFile.append("\t<link rel=\"stylesheet\" type=\"text/css\" 
href=\"").append(projectName).append(".min.css\">\n");
-        } else {
-            htmlFile.append("\t<link rel=\"stylesheet\" type=\"text/css\" 
href=\"").append(projectName).append(".css\">\n");
+        if (project.needCSS)
+        {
+            // if release version want to call minified css file, while in 
debug the non minified one
+            if (type.equals("release"))
+            {
+                htmlFile.append("\t<link rel=\"stylesheet\" type=\"text/css\" 
href=\"").append(projectName).append(".min.css\">\n");
+            }
+            else
+            {
+                htmlFile.append("\t<link rel=\"stylesheet\" type=\"text/css\" 
href=\"").append(projectName).append(".css\">\n");
+            }
         }
 
         htmlFile.append(getTemplateAdditionalHTML(additionalHTML));

Reply via email to