Move site into public/ to avoid uploading node_modules as assets
Deploy to Cloudflare Workers / deploy (push) Successful in 14s
Deploy to Cloudflare Workers / deploy (push) Successful in 14s
wrangler deploy runs npm install first, which creates node_modules at the repo root. With assets directory "." that got picked up as a static asset, including workerd's 122MB binary, exceeding the 25MiB Workers asset limit. Serving from ./public keeps node_modules out of the assets directory entirely. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
+4
-4
@@ -7,9 +7,9 @@ name = "portfolio"
|
||||
# Set this to the date you first deploy; Wrangler uses it to pin runtime behavior.
|
||||
compatibility_date = "2026-09-17"
|
||||
|
||||
# Serves every file in this directory as a static asset. Since index.html sits
|
||||
# at the repo root, "." works; move it into e.g. "./public" and update this if
|
||||
# you'd rather keep the repo root clean.
|
||||
# Serves every file in this directory as a static asset. Kept in ./public
|
||||
# (rather than the repo root) so that node_modules created by `npm install`
|
||||
# during CI deploys is never picked up as a site asset.
|
||||
[assets]
|
||||
directory = "."
|
||||
directory = "./public"
|
||||
not_found_handling = "404-page"
|
||||
|
||||
Reference in New Issue
Block a user