Skip to content

Commit

Permalink
chore: use watch_dir for cloudflare workers template
Browse files Browse the repository at this point in the history
there's a lot of issues with the
cloudflareDevProxyVitePlugin when it comes to
bindings and the dev server. this commit uses
watch_dir instead of the plugin. To make
bindings easier to work with.
  • Loading branch information
lifeiscontent authored and MichaelDeBoey committed Sep 29, 2024
1 parent 38ca648 commit eb91981
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion templates/cloudflare-workers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"build": "remix vite:build",
"deploy": "wrangler deploy",
"dev": "remix vite:dev",
"dev": "wrangler dev",
"lint": "eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint .",
"start": "wrangler dev",
"typegen": "wrangler types",
Expand Down
6 changes: 1 addition & 5 deletions templates/cloudflare-workers/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
import { defineConfig } from "vite";
import {
vitePlugin as remix,
cloudflareDevProxyVitePlugin,
} from "@remix-run/dev";
import { vitePlugin as remix } from "@remix-run/dev";
import tsconfigPaths from "vite-tsconfig-paths";

export default defineConfig({
plugins: [
cloudflareDevProxyVitePlugin(),
remix({
future: {
v3_fetcherPersist: true,
Expand Down
1 change: 1 addition & 0 deletions templates/cloudflare-workers/wrangler.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ bucket = "./build/client"

[build]
command = "npm run build"
watch_dir = "./src"

0 comments on commit eb91981

Please sign in to comment.