-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
This is the parent issue tracking the implementation of wrangler publish.
Usage
In it's simplest form, you can write a worker, say at index.js, and run: wrangler publish index.js --name myscriptname, and -
- it'll 'bundle' your script into a single file, and publish it to
myscriptname.<your subdomain>.workers.dev - Much like
wrangler dev, we aim to provide a default experience that's immediately useful, so you shouldn't have to setup a bundler/compiler for most usecases. So, you can use modules from npm, create separate modules, use react (todo:--jsx <reference>for other libraries), use typescript, and it should all Just Work. (more details on the tracking issue forwrangler dev) - Much like
wrangler dev,wrangler publishwill also automatically infer whether your script is in theservice-workerformat or the newer ESmodulesformat. - You can publish to your own domain/zone with
wrangler publish <script> --name <name> --zone somedomain.com --route "somedomain.com/path/*"- You'll note that you can pass a domain directly to zone, instead of a
zone_id.wrangler publishshould work with both forms of configuration.
- You'll note that you can pass a domain directly to zone, instead of a
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels