Wrangler has been awesome to get to work with so thanks for all the hard work. I'd like to please raise a feature request that would help with my use-case.
I'm attempting to incrementally adopt wrangler for uploading a worker and related KV storage.
I've already got a (perhaps over-complicated) build process so for now I just want wrangler to upload the file. (After doing a bunch of KV stuff)
I'm able to do this using type="javascript" which is great, but this requires me to modify the package.json main attribute.
Unfortunatly modifying this attribute breaks other things in my project.
I'd like to be able to specify the path to find the single JavaScript file by either wrangler.toml
type = "javascript"
main = "dist/worker.js"
or via the CLI
$ wrangler publish --main "dist/worker.js"
My preference would be via wrangler.toml
this makes sense to me - i always thought it was strange that we grabbed it from package.json
for webpack type projects, we allow a webpack_config field to point to a custom configuration.
i think for this one we should add a field in the toml javascript_config to match that convention.
for my money i like main, or entry-point or similar; there's not really a config here like with webpack, just an entry point file, so naming it config might be confusing. but semantics aside, i like this idea.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
for my money i like
main, orentry-pointor similar; there's not really a config here like with webpack, just an entry point file, so naming it config might be confusing. but semantics aside, i like this idea.