IIRC, JSON when imported is bundled as a JS object, so you shouldn’t need to make it binary instead
IIRC, JSON when imported is bundled as a JS object, so you shouldn’t need to make it binary instead
import JSON, am I missing something?functions/src/api.ts with the JSON under functions/builder/output.jsonresolveJsonModule set for TypeScriptDB) turned into __D1_BETA__DB. However in most cases I can't utilize either binding. Can anyone advise a path forward?wrangler pages deploy instead of uploading via the dashboard. It's only an issue with D1 bindings as far as I know. I believe the KV binding works as expected in both cases__D1_BETA__DB which would sometimes be a D1 binding and sometimes an empty objectJSON.stringify a FormData object
/functions) but I am getting the error:<p> for now. The end goal is to mimic a "site generator" (you can sorta think about it in terms of includes, I suppose - I'm aware there's stuff like Jekyll but this is more of a learning than using the "correct" resources) but I'll just go with replacing elements for now./functions/index.js, for example, automatically invoked when I visit index.html at the root? Or do I actually have to call it, somehow?✘ [ERROR] Could not resolve "../builder/output.json"
src/api.ts:2:28:
2 │ import someJson from "../builder/output.json"; functions/src/api.tsfunctions/builder/output.jsonresolveJsonModuleDB__D1_BETA__DB__D1_BETA__DBwrangler pages deployJSON.stringify/functionsError: Failed to publish your Function. Got error: Uncaught TypeError: Cannot convert object to primitive value<p>/functions/index.jsindex.htmlconst formData = await request.formData();
console.log(Object.fromEntries(formData))