Template for modules, webpack, commonjs
APACHE-2.0 License
A template for kick starting a Cloudflare Workers project using:
Worker code is in src/index.js
Webpack is configured to output a bundled CommonJS module to dist/index.js
This project uses a shim ES module at src/shim.mjs
that imports the commonjs bundle, and re-exports it. This is necessary because commonjs does not support named exports, and the only way to export a durable object class is using named exports.
module
key in package.json
.