cloudflare / templates

A collection of starter templates and examples for Cloudflare Workers and Pages
https://cloudflareworkers.com
MIT License
999 stars 632 forks source link

[rust] Update yarn commands to current wrangler usage signature #80

Closed Salzian closed 1 year ago

Salzian commented 2 years ago

When trying to create a workers-rust project as described in the cloudflare/workers-rs repository, one cannot use the yarn commands from the package.json file.

Running yarn dev or yarn deploy results in this error:

error: No loader is configured for ".rs" files: src/lib.rs

I guess these usage signatures originate from an older wrangler version. worker-rs now uses wranger2.

I updated the commands to the recommended usage from the worker-rs README file and they work for me now.

Fixes #75