{"id":18823163,"url":"https://github.com/dario-piotrowicz/wrangler-pages-functions-dev","last_synced_at":"2025-03-21T10:15:15.373Z","repository":{"id":241389266,"uuid":"805864294","full_name":"dario-piotrowicz/wrangler-pages-functions-dev","owner":"dario-piotrowicz","description":"Vite plugin for handling Pages Functions in dev mode","archived":false,"fork":false,"pushed_at":"2024-05-28T23:40:55.000Z","size":42,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-21T05:04:13.773Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/wrangler-pages-functions-dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dario-piotrowicz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-25T17:21:11.000Z","updated_at":"2025-03-03T10:37:16.000Z","dependencies_parsed_at":"2024-05-28T04:51:45.107Z","dependency_job_id":"03961f79-16cf-4700-91b9-6923086a70ad","html_url":"https://github.com/dario-piotrowicz/wrangler-pages-functions-dev","commit_stats":null,"previous_names":["dario-piotrowicz/wrangler-pages-functions-dev"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dario-piotrowicz%2Fwrangler-pages-functions-dev","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dario-piotrowicz%2Fwrangler-pages-functions-dev/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dario-piotrowicz%2Fwrangler-pages-functions-dev/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dario-piotrowicz%2Fwrangler-pages-functions-dev/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dario-piotrowicz","download_url":"https://codeload.github.com/dario-piotrowicz/wrangler-pages-functions-dev/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244776353,"owners_count":20508507,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T00:52:59.292Z","updated_at":"2025-03-21T10:15:15.340Z","avatar_url":"https://github.com/dario-piotrowicz.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `wrangler-pages-functions-dev`\n\n`wrangler-pages-functions-dev` is a Vite plugin that can be used to handle [Cloudflare Pages Functions](https://developers.cloudflare.com/pages/functions/) during local development.\n\nIt can be useful for example when working on a single page application that makes use of Pages Functions.\n\n## Usage\n\nInstall the package as a dev dependency alongside wrangler:\n```sh\nnpm i -D wrangler-pages-functions-dev wrangler\n```\n\nTo use the plugin with `vite dev` simply update your vite config file to include the plugin and to specify which routes it should handle, for example:\n\n```diff\nexport default defineConfig({\n  plugins: [\n+    wranglerPagesFunctionsDev({\n+      matchRoutes: /api/,\n+    }),\n    // ...\n  ],\n})\n```\n\nYou can preview or deploy you application with `wrangler pages` in the same exact way as you would without this plugin (this plugin only effects `vite dev` everything else works exactly the same as it would otherwise).\n\n## Examples\n\n- [React SPA hello-world example](https://github.com/dario-piotrowicz/wrangler-pages-functions-dev-react-spa-hello-world-example)\\\nVery minimalistic example that shows how this plugin can be used to locally developer a react SPA applications alongside Pages Functions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdario-piotrowicz%2Fwrangler-pages-functions-dev","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdario-piotrowicz%2Fwrangler-pages-functions-dev","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdario-piotrowicz%2Fwrangler-pages-functions-dev/lists"}