# modules-webpack-commonjs **Repository Path**: mirrors_cloudflare/modules-webpack-commonjs ## Basic Information - **Project Name**: modules-webpack-commonjs - **Description**: Template for modules, webpack, commonjs - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-03-10 - **Last Updated**: 2026-02-28 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 👷 Modules Wrangler template ## NOTE: You must be using wrangler 1.16 or newer to use this template A template for kick starting a Cloudflare Workers project using: - Modules (CommonJS modules to be specific) - Webpack - Wrangler 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. - This shim is also configured to be the main module, using the `module` key in `package.json`.