How does aggregation work for JavaScript and CSS files?

Created on 23 December 2019, over 4 years ago
Updated 8 November 2023, 7 months ago

Hi,

I like to know, how Drupal 8 aggregations are working for CSS and JS files. When it will create a temp file if opted for aggregation?

We have the realtime scenario, We have 2 drupal nodes, 2 LB nodes, and CDN server setup.

Aggregation is enabled. Whenever we deploy the new files to 2 drupal nodes. Based on the understanding of the new files will be updating the content on temp file to sites/default/files on the corresponding node. Obviously the second node will not have the temp file, so it will through you the 404 for temp file entry which is there in the cache table.

Based on our understanding, we should have a shared folder for sites/default/files. Which will be common for both drupal nodes to fix this issue.

Please correct us, if something is wrong with our understanding.

Thanks
Gopinath

💬 Support request
Status

Fixed

Version

8.9 ⚰️

Component
Asset library 

Last updated about 12 hours ago

No maintainer
Created by

🇮🇳India gopivthmk

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇳India Sachin_D

    Enabling aggregate javascript file config in drupal, the React component is not rendering in frontend.

    Description: I have created the custom module for react to integrate the react with drupal, and iam calling the react component in another custom module's twig file. This will works when we disabled the Aggregate javascript file config. but if enabled it, it wont render the template from react in front end.

Production build 0.69.0 2024