英文:
cloudflare_worker_script multiple files
问题
使用CloudFlare Web仪表板,可以使用ES模块语法将您的代码拆分为多个文件。它可以直接使用。
是否可以使用CF Terraform提供程序和cloudflare_worker_script
创建这样的配置,而不需要像webpack这样的JS捆绑包?
根据他们的文档 ,没有这样的选项。
英文:
Using CloudFlare web dashboard it's possible to split your code into multiple files using ES module syntax. It works out of the box.
Is it possible to create such configuration using CF Terraform provider and cloudflare_worker_script
without JS bundles like webpack?
resource "cloudflare_worker_script" "spainter_script_file_utils" {
name = "spainter"
account_id = var.cloud_flare_account_id
content = file("./workers.js")
module = true
}
According to their documentation there's no such option
答案1
得分: 1
抱歉,API支持上传其他JavaScript文件作为附加模块,但Terraform提供程序尚未实现该功能,因此它期望您自行使用Webpack、esbuild等打包。
英文:
Unfortunately not - the API supports uploading other JavaScript files as additional modules but the Terraform provider hasn't implemented that so it expects you to bundle yourself using Webpack, esbuild, etc
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论