cloudflare · Cloudflare Workers Docs
Workers 1. Migrate webpack projects
Migrate webpack-based Cloudflare Workers projects from Wrangler v1 to v2 by transitioning from the deprecated type and webpackconfig configuration keys to modern Wrangler v2 build patterns.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Workers 1. Migrate webpack projects
Migrate webpack-based Cloudflare Workers projects from Wrangler v1 to v2 by transitioning from the deprecated type and webpackconfig configuration keys to modern Wrangler v2 build patterns.
When To Use
Use when migrating a Cloudflare Workers project from Wrangler v1 to v2 that currently relies on webpack configuration keys like type or webpackconfig.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/workers-wrangler-migration-1-migrate-webpack-projects-workflow-guide.md | A guide detailing the steps to migrate webpack-based Cloudflare Workers projects from Wrangler v1 to Wrangler v2. | Questions about a guide detailing the steps to migrate webpack-based Cloudflare Workers projects from Wrangler v1 to Wrangler v2. |
examples/workers-wrangler-migration-1-migrate-webpack-projects-cloudflare-workers.text | A list of npm installation commands for required webpack and wranglerjs-compat-webpack-plugin dependencies to migrate projects to Wrangler. | Exact payloads, commands, or snippets shown in A list of npm installation commands for required webpack and wranglerjs-compat-webpack-plugin dependencies to migrate... |
examples/workers-wrangler-migration-1-migrate-webpack-projects-cloudflare-workers-2.text | A list of yarn commands to install the required webpack and wranglerjs-compat-webpack-plugin dependencies for migrating projects. | Exact payloads, commands, or snippets shown in A list of yarn commands to install the required webpack and wranglerjs-compat-webpack-plugin dependencies for migrati... |
examples/workers-wrangler-migration-1-migrate-webpack-projects-cloudflare-workers-3.text | The pnpm commands required to install webpack, webpack-cli, and the wranglerjs-compat-webpack-plugin for migrating projects. | Exact payloads, commands, or snippets shown in The pnpm commands required to install webpack, webpack-cli, and the wranglerjs-compat-webpack-plugin for migrating pr... |
examples/workers-wrangler-migration-1-migrate-webpack-projects-cloudflare-workers-4.text | A text command for installing webpack and wranglerjs-compat-webpack-plugin using the bun package manager. | Exact payloads, commands, or snippets shown in A text command for installing webpack and wranglerjs-compat-webpack-plugin using the bun package manager. |
examples/workers-wrangler-migration-1-migrate-webpack-projects-cloudflare-workers-5.text | A package.json file demonstrating the necessary devDependencies and configuration changes required to migrate a webpack-based project to Cloudflare Workers. | Exact payloads, commands, or snippets shown in A package.json file demonstrating the necessary devDependencies and configuration changes required to migrate a webpa... |
examples/workers-wrangler-migration-1-migrate-webpack-projects-cloudflare-workers-6.text | A JavaScript module export demonstrating the integration of the wranglerjs-compat-webpack-plugin into a webpack configuration file. | Exact payloads, commands, or snippets shown in A JavaScript module export demonstrating the integration of the wranglerjs-compat-webpack-plugin into a webpack confi... |
examples/workers-wrangler-migration-1-migrate-webpack-projects-cloudflare-workers-7.text | A package.json configuration snippet demonstrating how to add a webpack build script for migrating to Wrangler. | Exact payloads, commands, or snippets shown in A package.json configuration snippet demonstrating how to add a webpack build script for migrating to Wrangler. |
examples/workers-wrangler-migration-1-migrate-webpack-projects-cloudflare-workers-8.text | A text example showing the removal of webpack-specific configuration fields from a wrangler.toml file during migration. | Exact payloads, commands, or snippets shown in A text example showing the removal of webpack-specific configuration fields from a wrangler.toml file during migration. |
examples/workers-wrangler-migration-1-migrate-webpack-projects-cloudflare-workers-9.text | A text representation of a webpack configuration file used to demonstrate the migration process for Cloudflare Workers projects. | Exact payloads, commands, or snippets shown in A text representation of a webpack configuration file used to demonstrate the migration process for Cloudflare Worker... |
examples/workers-wrangler-migration-1-migrate-webpack-projects-cloudflare-workers-10.text | A sample wrangler.toml configuration demonstrating how to map webpack output files during a migration. | Exact payloads, commands, or snippets shown in A sample wrangler.toml configuration demonstrating how to map webpack output files during a migration. |
examples/workers-wrangler-migration-1-migrate-webpack-projects-cloudflare-workers-11.text | A configuration example showing the main entry point and build command settings for ejecting a webpack project to Cloudflare Workers. | Exact payloads, commands, or snippets shown in A configuration example showing the main entry point and build command settings for ejecting a webpack project to Clo... |
What This Skill Covers
- This guide describes the steps to migrate a webpack project from Wrangler v1 to Wrangler v2. After completing this guide, update your Wrangler version.
- Main sections:
I use [build] to run webpack (or another bundler) external to Wrangler.,I use type = webpack, but do not provide my own configuration and let Wrangler take care of it.,I use type = webpack and webpackconfig = to handle JSX, TypeScript, WebAssembly, HTML files, and other non-standard filetypes.,I use type = webpack and webpackconfig = to perform code-transforms and/or other code-modifying functionality..
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://developers.cloudflare.com/workers/wrangler/migration/v1-to-v2/eject-webpack
