⚡ Optimize build by combining JSDOM transforms#18
⚡ Optimize build by combining JSDOM transforms#18google-labs-jules[bot] wants to merge 1 commit intomainfrom
Conversation
Combines `img-dim` and `apply-csp` transforms into a single pass to reduce JSDOM parsing overhead. Exports processing logic from original files and orchestrates them in `_11ty/combined-transforms.js`. Ensures the combined transform runs last in the pipeline to support correct CSP hashing.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
11ty | 17507fc | Jan 19 2026, 07:31 PM |
✅ Deploy Preview for sijobling ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for si-jobling ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
💡 What:
_11ty/img-dim.jsand_11ty/apply-csp.jsto export their core processing logic asprocessImagesandprocessCsprespectively._11ty/combined-transforms.jsthat parses the HTML once usingJSDOM, runs both image processing and CSP hashing on the shared DOM, and then serializes it..eleventy.jsto replace the individualimgDimandcspplugins with the newcombinedplugin, placed at the end of the transform chain.🎯 Why:
img-dimandapply-cspeach parsed the HTML content separately using JSDOM. JSDOM parsing is computationally expensive and was happening twice per page.📊 Measured Improvement:
The functionality of image optimization (srcset generation, dimensions) and CSP hashing has been verified to be preserved. The combined transform is placed at the end of the pipeline to ensure that CSP hashes are calculated on the final HTML content (after minification and other transforms), correcting a potential issue where
img-dimrunning first might have been less optimal or where splitting them caused ordering headaches.PR created automatically by Jules for task 13111890532194831952 started by @si