We’re on fire this week. Here is yet another powerful library!
Enonic has always offered effective and automated asset hosting (javascript, css etc). With the refreshed static library, developers get more control over how assets are served and cached.
The library also handles index.html files - acting like a regular webserver. This includes fallback handling for deep-linking in Single Page Apps (SPAs) for instance.
Unlike the simpler asset library which generates a hash for every deployment of your app. Static library let the developers manage hashing themselves at compile time - for ultra-high performance.
It is easy to get started. Place your files or static webapp in /src/main/resources/static
, create a controller using lib-static, and deploy your Enonic app. Combined with Enonic Cloud, you automatically get global CDN caching for low latency and the highest possible performance.
Find detailed usage examples and instructions in the new documenation