Describe the solution
Similar to #2410, when we are building a worker, sometimes we want to know the URL of where it will be deployed while building it. For production cases the main URL will be known, and likely aliased to a non workers.dev URL, but for previews, there's no way to know the "version prefix" until after the version is created. Adding different environments into the mix further complicates things. As does supporting local wrangler dev url.
Possible solutions:
- allow calculating the version prefix before doing a build
- allow creating a version without uploading any files, just to get the new prefix, and then build and upload the files
- allow manually specifying a version prefix rather than using a calculated one
Figuring this out sooner rather than later would be good, considering what is happening with the workers builds git integration and automatically doing branch/PR builds. We'll have same issues there and even more cases to deal with.
Describe the solution
Similar to #2410, when we are building a worker, sometimes we want to know the URL of where it will be deployed while building it. For production cases the main URL will be known, and likely aliased to a non workers.dev URL, but for previews, there's no way to know the "version prefix" until after the version is created. Adding different environments into the mix further complicates things. As does supporting local wrangler dev url.
Possible solutions:
Figuring this out sooner rather than later would be good, considering what is happening with the workers builds git integration and automatically doing branch/PR builds. We'll have same issues there and even more cases to deal with.