diff --git a/test/production/standalone-mode/server-action-externals/app/actions.ts b/test/production/standalone-mode/server-action-externals/app/actions.ts new file mode 100644 index 0000000000..d7e81ac580 --- /dev/null +++ b/test/production/standalone-mode/server-action-externals/app/actions.ts @@ -0,0 +1,10 @@ +'use server' + +import _ from 'lodash' +import Queue from 'yocto-queue' + +export async function doStuff() { + const queue = new Queue() + queue.enqueue(_.camelCase('hello world')) + return queue.dequeue() ?? '' +} diff --git a/test/production/standalone-mode/server-action-externals/app/button.tsx b/test/production/standalone-mode/server-action-externals/app/button.tsx new file mode 100644 index 0000000000..c45a38d655 --- /dev/null +++ b/test/production/standalone-mode/server-action-externals/app/button.tsx @@ -0,0 +1,14 @@ +'use client' + +import { useState } from 'react' +import { doStuff } from './actions' + +export function Button() { + const [result, setResult] = useState('') + return ( + <> + +

{result}

+ + ) +} diff --git a/test/production/standalone-mode/server-action-externals/app/layout.tsx b/test/production/standalone-mode/server-action-externals/app/layout.tsx new file mode 100644 index 0000000000..888614deda --- /dev/null +++ b/test/production/standalone-mode/server-action-externals/app/layout.tsx @@ -0,0 +1,8 @@ +import { ReactNode } from 'react' +export default function Root({ children }: { children: ReactNode }) { + return ( + + {children} + + ) +} diff --git a/test/production/standalone-mode/server-action-externals/app/page.tsx b/test/production/standalone-mode/server-action-externals/app/page.tsx new file mode 100644 index 0000000000..24c9d8de35 --- /dev/null +++ b/test/production/standalone-mode/server-action-externals/app/page.tsx @@ -0,0 +1,5 @@ +import { Button } from './button' + +export default function Page() { + return