cheatcode / joystick

A full-stack JavaScript framework for building stable, easy-to-maintain apps and websites.
https://cheatcode.co/joystick
Other
209 stars 11 forks source link

Warn developers when files in /public exceed 10MB #338

Open rglover opened 1 year ago

rglover commented 1 year ago

The ideal pattern for public files is to keep it light and to only what's needed for the UI. Anything > 10MB is likely a file that should be moved off to a CDN (e.g., S3/CloudFront).

There's also a built-in payload limit for Joystick apps deployed with Push, so this foreshadows that while encouraging solid practices.

Do it at the joystick.js/node level so it's more of a nag. This way it will actually be handled and not ignored till the last minute.