Dom
Dom
CDCloudflare Developers
Created by Dom on 2/19/2025 in #pages-help
Previously deployed index.html still gets served
3 replies
CDCloudflare Developers
Created by Dom on 2/19/2025 in #pages-help
Previously deployed index.html still gets served
I temporarily solved it by adding a /start route and then publishing a index.html that does a html redirecto to /start. ten I removed the index.html again. Now I sstill get the index.html with the redirect served, even though its no longer present in the deployment
3 replies
CDCloudflare Developers
Created by Dom on 2/18/2025 in #workflows-beta
Hey!
Originally, my binding was called IMPORT_WORKFLOW but that gave the same error, so I thought I call it USER_WORKFLOW bu still no luck
3 replies
CDCloudflare Developers
Created by Dom on 2/18/2025 in #workflows-beta
Hey!
wrangler config:
{
"name": "website-assist",
"compatibility_date": "2025-02-04",
"main": "./server/index.ts",
"compatibility_flags": [
"nodejs_compat"
],
"workflows": [
{
"name": "workflow",
"binding": "USER_WORKFLOW",
"class_name": "ExcelImportWorkflow"
}
],
"assets": {
"directory": "./build/client",
"binding": "ASSETS"
},
{
"name": "website-assist",
"compatibility_date": "2025-02-04",
"main": "./server/index.ts",
"compatibility_flags": [
"nodejs_compat"
],
"workflows": [
{
"name": "workflow",
"binding": "USER_WORKFLOW",
"class_name": "ExcelImportWorkflow"
}
],
"assets": {
"directory": "./build/client",
"binding": "ASSETS"
},
vite config:
import { defineConfig } from "vite";
import {
vitePlugin as remix,
cloudflareDevProxyVitePlugin,
} from "@remix-run/dev";
import tsconfigPaths from "vite-tsconfig-paths";
import { getLoadContext } from "./load-context";

import devServer, { defaultOptions } from '@hono/vite-dev-server'
import adapter from '@hono/vite-dev-server/cloudflare'

declare module "@remix-run/cloudflare" {
interface Future {
v3_singleFetch: true;
}
}

export default defineConfig({
plugins: [
cloudflareDevProxyVitePlugin({
getLoadContext,
}),
remix({
future: {
v3_fetcherPersist: true,
v3_relativeSplatPath: true,
v3_throwAbortReason: true,
v3_singleFetch: true,
v3_lazyRouteDiscovery: true,
},
}),
devServer({
adapter,
entry: 'server/index.ts',
exclude: [...defaultOptions.exclude, '/assets/**', '/app/**'],
injectClientScript: false,
}),
tsconfigPaths(),
],
ssr: {
external: ["cloudflare:workers"],
resolve: {
conditions: ["workerd", "worker", "browser"],
},
},

resolve: {
mainFields: ["browser", "module", "main"],
},
build: {
minify: false,
dynamicImportVarsOptions: { exclude: ["cloudflare:workers"] }
},
});
import { defineConfig } from "vite";
import {
vitePlugin as remix,
cloudflareDevProxyVitePlugin,
} from "@remix-run/dev";
import tsconfigPaths from "vite-tsconfig-paths";
import { getLoadContext } from "./load-context";

import devServer, { defaultOptions } from '@hono/vite-dev-server'
import adapter from '@hono/vite-dev-server/cloudflare'

declare module "@remix-run/cloudflare" {
interface Future {
v3_singleFetch: true;
}
}

export default defineConfig({
plugins: [
cloudflareDevProxyVitePlugin({
getLoadContext,
}),
remix({
future: {
v3_fetcherPersist: true,
v3_relativeSplatPath: true,
v3_throwAbortReason: true,
v3_singleFetch: true,
v3_lazyRouteDiscovery: true,
},
}),
devServer({
adapter,
entry: 'server/index.ts',
exclude: [...defaultOptions.exclude, '/assets/**', '/app/**'],
injectClientScript: false,
}),
tsconfigPaths(),
],
ssr: {
external: ["cloudflare:workers"],
resolve: {
conditions: ["workerd", "worker", "browser"],
},
},

resolve: {
mainFields: ["browser", "module", "main"],
},
build: {
minify: false,
dynamicImportVarsOptions: { exclude: ["cloudflare:workers"] }
},
});
3 replies