chore: update wrangler config & add minify

This commit is contained in:
javayhu 2025-05-06 23:42:16 +08:00
parent 7af193f770
commit 3887da26d0

View File

@ -1,12 +1,49 @@
/**
* For more details on how to configure Wrangler, refer to:
* https://developers.cloudflare.com/workers/wrangler/configuration/
*/
{ {
"$schema": "node_modules/wrangler/config-schema.json", "$schema": "node_modules/wrangler/config-schema.json",
"main": ".open-next/worker.js", "main": ".open-next/worker.js",
"name": "mksaas-template", "name": "mksaas-template",
"compatibility_date": "2024-12-30", "compatibility_date": "2024-12-30",
"compatibility_flags": ["nodejs_compat"], "compatibility_flags": [
"nodejs_compat",
"nodejs_compat_populate_process_env"
],
// Minification helps to keep the Worker bundle size down and improve start up time.
"minify": true,
"assets": { "assets": {
"directory": ".open-next/assets", "binding": "ASSETS",
"binding": "ASSETS" "directory": ".open-next/assets"
}, },
"observability": {
"enabled": true
},
/**
* Smart Placement
* Docs: https://developers.cloudflare.com/workers/configuration/smart-placement/#smart-placement
*/
"placement": { "mode": "smart" },
/**
* Bindings
* Bindings allow your Worker to interact with resources on the Cloudflare Developer Platform, including
* databases, object storage, AI inference, real-time communication and more.
* https://developers.cloudflare.com/workers/runtime-apis/bindings/
*/
/**
* Environment Variables
* https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables
*/
"vars": {},
/**
* Note: Use secrets to store sensitive data.
* https://developers.cloudflare.com/workers/configuration/secrets/
*/
"kv_namespaces": [] "kv_namespaces": []
} }