From 8613e390cc303023c5a1f2bc46994133cee71f16 Mon Sep 17 00:00:00 2001 From: Dominic Elm Date: Thu, 25 Jul 2024 18:04:36 +0200 Subject: [PATCH] fix: do not use path mapping for worker function --- eslint.config.mjs | 1 + packages/bolt/functions/[[path]].ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 31649e8..8f51a0e 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -28,6 +28,7 @@ export default [ }, { files: [...tsFileExtensions, ...jsFileExtensions, '**/*.tsx'], + ignores: ['packages/bolt/functions/*'], rules: { 'no-restricted-imports': [ 'error', diff --git a/packages/bolt/functions/[[path]].ts b/packages/bolt/functions/[[path]].ts index 27bb892..4f19660 100644 --- a/packages/bolt/functions/[[path]].ts +++ b/packages/bolt/functions/[[path]].ts @@ -2,7 +2,7 @@ import type { ServerBuild } from '@remix-run/cloudflare'; import { createPagesFunctionHandler } from '@remix-run/cloudflare-pages'; // @ts-ignore because the server build file is generated by `remix vite:build` -import * as serverBuild from '~/build/server'; +import * as serverBuild from '../build/server'; export const onRequest = createPagesFunctionHandler({ build: serverBuild as unknown as ServerBuild,