cancel
Showing results for 
Search instead for 
Did you mean: 

css loaded as javascript with 4.0.1EE

lotharmärkle
Champ in-the-making
Champ in-the-making
Hi,

I have the following extension module defined which loads a dependent css and javascript files. But the css is rendered into a <script> tag instead of a css @import with 4.0.1EE. Chrome complains about invalid javascript while interpreting the css… As it works with 4.0dCE is there something wrong with the xml here or should this be raised in JIRA (could not find any related issue)?


<extension>
   <modules>
      <module>
         <id>test-module</id>
         <auto-deploy>true</auto-deploy>
         <customizations>
            <customization>
               <dependencies>
                  <css>/res/components/test.css</css>
                  <js>/res/components/test1.js</js>
                  <js>/res/component/test2.js</js>
               </dependencies>
            </customization>
         </customizations>
      </module>
   </modules>
</extension>

This is the result in HTML, see the css is referenced by a <script> tag:


   <!– Extension Module Dependencies –>

   <script type="text/javascript" src="/share/res/components/test1.js"></script>
   <script type="text/javascript" src="/share/res/components/test2.js"></script>
   <script type="text/javascript" src="/share/res/components/test.css"></script>


Thanks
1 REPLY 1

afaust
Legendary Innovator
Legendary Innovator
Hello,

there appears to be a typo / "copy & paste" style error in the Surf AbstractRequestContext class which adds CSS dependencies to the list of JS dependencies. If you have found this in an EE version, this should be filed via ACT - either against the SLA of an Enterprise customer or as a partner enablement issue.

Regards
Axel