workers-graphql-server icon indicating copy to clipboard operation
workers-graphql-server copied to clipboard

Migrate to Wrangler 2

Open qbunt opened this issue 3 years ago • 2 comments

With the release of Wrangler 2, there are a variety of deprecations that should be handled in the wrangler.toml file, as well as a build process change for webpack based workers. Most importantly, Wrangler 2 now supports the ESM module syntax, which will require a number of source code changes.

We're going to try getting a PR for this together in the upgrade of our own project, but wanted to track this ticket.

qbunt avatar May 10 '22 15:05 qbunt

Any luck with this? I have followed this guide to create a custom build: https://developers.cloudflare.com/workers/wrangler/migration/eject-webpack/#migrate-webpack-projects-from-wrangler-version-1

When I follow the steps, webpack-cli can't find webpack.config file, althought is no longer needed 😪

[webpack-cli] Failed to load 'C:\Users\user\Desktop\repos\my-app2\webpack.config.js' config

sebasospina343 avatar Jun 15 '22 20:06 sebasospina343

I created a template repository to deploy apollo-server to cloudflare workers during researching about Cloudflare Workers. It is based on this repository with some changes from me.

  • Typescript support
  • Wrangler v2
  • Esbuild support
  • Webpack is removed

Link: https://github.com/kimyvgy/worker-apollo-server Live demo: https://worker-apollo-server.webee-asia.workers.dev/playground

I would like to transfer it to Cloudflare orgnization if I can. Thanks to Cloudflare for the helpful repository.

kimyvgy avatar Sep 29 '22 08:09 kimyvgy