Try now Demo en
  • en
  • fr
  • de
  • Solutions
    • Use cases
      • Modern IntranetBuild strong internal culture & sense of belonging
      • Collaboration PlatformEfficient teamwork and project collaboration
      • Social NetworkEngage users & recognize contributions
      • Knowledge hubCentralize, organize and share company knowledge
      • Application PortalUnified access to business applications and information
    • Switch to eXo
      • Microsoft 365 AlternativeAn open-source digital workplace alternative to M365
      • Migrate to eXo PlatformA guided, secure migration path from your existing tools to eXo
  • Product
    • Overview
      • Platform overviewExplore core capabilities
      • Why eXoKey differentiators
      • InternationalisationMultilingual environments
      • MobileBranded mobile applications
    • Platform
      • No CodeTailor to your needs without code
      • IntegrationsConnectors & extension capabilities
      • Controlled AIGoverned, extensible AI
    • Technology
      • ArchitectureArchitecture & technology
      • SecuritySecurity measures
      • Open sourceComponents & licensing
  • Offers
    • EnterprisePrivate cloud or on-premise deployments
    • eXo HubsReady-to-use SaaS edition for teams
    • Compare EditionsCompare editions and choose the right fit
    • OEM EditionFor software vendors & service providers
    • ServicesDiscover eXo professional services
  • Resources
    • Resource center
      • Case studies
      • White Papers
      • Datasheets
      • Videos
    • FAQsAbout the software, the community and our offers
      • Platform & Use Cases
      • AI & Responsible AI
      • Deployment, Security & Compliance
      • Open-source, Pricing & Services
    • From The Blog
      • eXo Platform 7.1 is released
      • Digital sovereignty: when public organizations move from words to action
      • Cloud Vs On-premise Digital Workplace: Which one is right for your business?
  • Community
    • CommunityJoin our online community platform
    • DownloadLaunch eXo platform in your infrastructure
    • Source codeSource code on github
    • REST APIs & DocumentationAll REST APIs available in eXo Platform
  • Company
    • About us
    • Customers
    • Partners
    • Contact us
    • Newsroom
  • Menu mobile
    • Enterprise Offers
    • Blog
    • About us
    • Resource center
    • Careers
    • Contact us
    • Try eXo
Use cases
  • Modern Intranet Build strong internal culture & sense of belonging
  • Collaboration Platform Efficient teamwork and project collaboration
  • Social Network Engage users & recognize contributions
  • Knowledge hub Centralize, organize and share company knowledge
  • Application Portal Unified access to business applications and information
Switch to eXo
  • Microsoft 365 Alternative An open-source digital workplace alternative to M365
  • Migrate to eXo Platform A guided, secure migration path from your existing tools to eXo
Overview
  • Platform overview Explore core capabilities
  • Why eXo Key differentiators
  • Internationalisation Multilingual environments
  • Mobile Branded mobile applications
Platform
  • No Code Tailor to your needs without code
  • Integrations Connectors & extension capabilities
  • Controlled AI Governed, extensible AI
Technology
  • Architecture Architecture & technology
  • Security Security measures
  • Open source Components & licensing
Enterprise Private cloud or on-premise deployments
eXo Hubs Ready-to-use SaaS edition for teams
Compare Editions Compare editions and choose the right fit
OEM Edition For software vendors & service providers
Services Discover eXo professional services
Resource center
  • Case studies
  • White Papers
  • Datasheets
  • Videos
FAQs About the software, the community and our offers
  • Platform & Use Cases
  • AI & Responsible AI
  • Deployment, Security & Compliance
  • Open-source, Pricing & Services
From The Blog
  • eXo Platform 7.1 is released
  • Digital sovereignty: when public organizations move from words to action
  • Cloud Vs On-premise Digital Workplace: Which one is right for your business?
Community Join our online community platform
Download Launch eXo platform in your infrastructure
Source code Source code on github
REST APIs & Documentation All REST APIs available in eXo Platform
About us
Customers
Partners
Contact us
Newsroom
Enterprise Offers
Blog
About us
Resource center
Careers
Contact us
Try eXo
  1. Accueil
  2. Tutorial
  3. New Javascript minification disabling option in eXo Platform 5.0

New Javascript minification disabling option in eXo Platform 5.0

Thanks to its built-in Javascript module support, eXo Platform allows to easily integrate any custom or third-party Javascript. The script must be declared in the file WEB-INF/gatein-resources.xml of your extension webapp:

<module>
    <name>myscript</name>
    <script>
        <path>/javascript/myscript.js</path>
    </script>
</module>

and can then be injected in any other page, portlet or other script:

(function(myscript) {
    myscript.doWhateverYouWant();
    ...
})(myscript);

The declared javascript files are automatically minified to reduce their size and therefore the size of resources fetched in web pages. This is a good practice but it can cause issues when the script is not compatible with the minifier used in eXo Platform (Google Closure Compiler). For example, this issue has been discovered for React.js (chapter “Incompatibility with the GateIn minifier”).
In eXo Platform 5.0 we added a new option in the Javascript module configuration to disable the minification: minify. The default value is set to true to keep backward compatibility.

<module>
    <name>myscript</name>
    <script>
        <minify>false</minify>
        <path>/javascript/myscript.js</path>
    </script>
</module>

When the minify option is set to false, the script is injected as is, without any alteration. It allows to package your already minified script, with the source map files, using your favorite tool (webpack, …).

We believe this will make third parties’ Javascript libraries easier to integrate and therefore improve the developers’ experience.


Join The eXo Tribe
Join The eXo Tribe


Register for our Community to Get updates, tutorials, support, and access to the Platform and add-on downloads. Sign in Now!

Brahim Jaouane

I am a Digital Marketing specialist specialized in SEO at eXo Platform. Passionate about new technologies and Digital Marketing. With 10 years' experience, I support companies in their digital communication strategies and implement the tools necessary for their success. My approach combines the use of different traffic acquisition levers and an optimization of the user experience to convert visitors into customers. After various digital experiences in communication agencies as well as in B2B company, I have a wide range of skills and I am able to manage the digital marketing strategy of small and medium-sized companies.

Full-featured digital workplace with everything your employees need to work efficiently, smartly integrated for a compelling employee experience

  • Product
    • Software tour
    • Internationalisation
    • Mobile
    • No Code
    • Architecture
    • Integrations
    • Security
    • Open Source
  • Uses cases
    • Employee Portal
    • Knowledge management
    • Entreprise Social Network
    • Employee Engagement
    • Community Management
    • Extranet
  • Guides
    • What is a digital workplace?
    • Intranet guide
    • What is an extranet?
    • Employee engagement
    • Collaboration guide
    • Teamwork guide
    • Internal Communication guide
  • Enterprise
    • Product offer
    • Services Offer
    • Customers
    • About us
  • Resources
    • FAQs
    • Resource Center
    • Intranet Portal
    • What Is a Collaboration Software?
    • Talent Management
    • Employee Connection
    • Employee Intranet
    • Improve internal communication
    • eXo Tribe
  • Terms and Conditions
  • Legal
  • Privacy Policy
  • Accessibility
  • Contact us
  • Sitemap
  • Facebook
  • Twitter
  • LinkedIn
wpDiscuz