The first stable version 1.0.2 - and future releases - can be found at:
Thank you everybody for your suggestions, help, insights and encouragement!
Hi there, CF community!
This is a request for comments and feedback on a freshly-released Cloudflare Workers Webpack Boilerplate on Github: https://github.com/detroitenglish/cloudflare-worker-webpack-boilerplate
What It Is
The goal is to provide a simple template for building, bundling and deploying Cloudflare Workers using Webpack - especially for devs unfamiliar with the black-magic of
Facebook’s React team demonstrated pretty clearly that providing developers with a solid boilerplate to hack away with is a fantastic tool for building a community around new tech. In short, this project is intended to be that exact tool for Cloudflare Workers.
The Stuff It Does
Quoting the repository’s README…
What you configure:
- Your Cloudflare credentials
- Your site name (FQDN), or zone-ID
- (Optional) One or more route matching patterns for your Worker
What you get:
- Transparent, optimized and ready-to-rock Webpack configuration file
- Babel configuration ensuring development-setup build compatibility for Node 6 and up
- Dynamic polyfilling, applied only when needed (which is anyways very unlikely!)
- Baked-in management of route matching patterns, if and when routes are provided
- Minification of deployed Worker scripts to help keep them under the 1MB limit
- A ready-to-deploy example Worker in worker.js, which includes the use of
require()and comments to help make sense of it all
You’re the experts on (…and inventors of!) everything Cloudflare Workers, so I’m asking for your comments, suggestions and criticisms in the hope that we can offer a rock-solid starting point for developers.
Your thoughts are all I’m hoping for… but if you’re feeling saucy, try installing the boilerplate, deploying workers, and generally doing whatever you can to break stuff.
Have insights or ideas? Please, write your thoughts in the comments of this thread!
(Creating an issue on Github is also both welcome and awesome)
Mandatory Action-Packed Gif
For some context, here’s the boilerplate Worker’s build and deployment inaction:
All input will be mucho appreciated; nonetheless, thanks for reading!
27 Aug 2018:
- Change configuration requirement with new auto-lookup of site FQDN
- New .gif image to show 0.0.1-beta.5 output style
29 Aug 2018:
- Final update; v1.0.2 stable released - link added up top