RSSAmplifier

Blog

Matteo Mazzarolo's blog

Matteo Mazzarolo's personal blog. JavaScript, productivity, nerdy stuff.

mmazzarolo.comRSS feed ↗10 posts

Latest posts

Refactoring barrel files with codemods

Barrel files can be a pain to deal with. Here's a jscodeshift codemod to refactor your codebase to stop referencing barrel file imports.

Handling CORS and opaque responses in Service Workers

Notes and gotchas on how to deal with CORS, opaque responses, and Cache Storage API in Service Workers

Optimizing SPA load times with async chunks preloading

Improve the performance of client-side rendered SPAs by avoiding the waterfall effect caused by route-based lazy-loading.

Conditional logging with query parameters

A simple pattern for enabling conditional logging using query parameters in your web applications.

Flexible network data preloading in large SPAs

Sharing my experience with a pattern I’ve used multiple times to implement flexible network data preloading in large client-side-rendered SPAs.

Setting up my fish shell from scratch on macOS

Sharing my notes on setting up the fish shell on macOS, including customizations like plugins, themes, and abbreviations.

Use relative paths in markdown and MDX images with Next.js

Next.js markdown/MDX blogs do not support loading images and other static assets using relative path by default. Here's how you can enable it.

Automatic width and height of local MDX images with Next.js

Preventing Cumulative Layout Shift in a Next.js blog: how to automatically set the width and height attributes on local images referenced in MDX & markdown files.

Named element IDs can be referenced as JavaScript globals

Did you know that DOM elements with IDs are accessible in JavaScript as global variables?

Automating visual UI tests with Playwright and GitHub Actions

How to build and automate a visual regression testing setup with Playwright and GitHub Actions.