diff --git a/packages/vite/src/plugins/vite-plugin-rsc-transform.ts b/packages/vite/src/plugins/vite-plugin-rsc-transform.ts index 0751900d122f..996713506d01 100644 --- a/packages/vite/src/plugins/vite-plugin-rsc-transform.ts +++ b/packages/vite/src/plugins/vite-plugin-rsc-transform.ts @@ -6,7 +6,7 @@ import type { Plugin } from 'vite' import { getPaths } from '@redwoodjs/project-config' export function rscTransformPlugin( - clientEntryFiles: Record + clientEntryFiles: Record, ): Plugin { return { name: 'rsc-transform-plugin', @@ -63,7 +63,7 @@ export function rscTransformPlugin( if (useClient && useServer) { throw new Error( - 'Cannot have both "use client" and "use server" directives in the same file.' + 'Cannot have both "use client" and "use server" directives in the same file.', ) } @@ -74,7 +74,7 @@ export function rscTransformPlugin( code, body, id, - clientEntryFiles + clientEntryFiles, ) } else { transformedCode = transformServerModule(code, body, id) @@ -246,7 +246,7 @@ function addExportNames(names: Array, node: any) { async function parseExportNamesIntoNames( code: string, body: any, - names: Array + names: Array, ): Promise { for (let i = 0; i < body.length; i++) { const node = body[i] @@ -308,7 +308,7 @@ async function transformClientModule( code: string, body: any, url: string, - clientEntryFiles: Record + clientEntryFiles: Record, ): Promise { const names: Array = [] @@ -319,7 +319,7 @@ async function transformClientModule( // entryRecord will be undefined for dev, because clientEntryFiles will just // be an empty object. See rscWorker.ts, where we do rscTransformPlugin({}) const entryRecord = Object.entries(clientEntryFiles).find( - ([_key, value]) => value === url + ([_key, value]) => value === url, ) const loadId = entryRecord @@ -342,7 +342,7 @@ async function transformClientModule( url + " from the server but it's on the client. It's not possible to " + 'invoke a client function from the server, it can only be ' + - 'rendered as a Component or passed to props of a Client Component.' + 'rendered as a Component or passed to props of a Client Component.', ) + ');' } else { @@ -357,7 +357,7 @@ async function transformClientModule( name + ' is on the client. ' + "It's not possible to invoke a client function from the server, it can " + - 'only be rendered as a Component or passed to props of a Client Component.' + 'only be rendered as a Component or passed to props of a Client Component.', ) + ');' }