From 70f1844cda739efb12e02ac73fefd2c5a1efde29 Mon Sep 17 00:00:00 2001 From: Paul Barry Date: Mon, 4 Dec 2023 11:58:52 -0500 Subject: [PATCH] Issue-1118: Refactor rollup config generation for SSR --- packages/cli/src/config/rollup.config.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/cli/src/config/rollup.config.js b/packages/cli/src/config/rollup.config.js index 823aef2cf..fa3a2c550 100644 --- a/packages/cli/src/config/rollup.config.js +++ b/packages/cli/src/config/rollup.config.js @@ -383,10 +383,8 @@ const getRollupConfigForApis = async (compilation) => { const getRollupConfigForSsr = async (compilation, input) => { const { outputDir } = compilation.context; - // TODO should routes and APIs have chunks? - // https://github.com/ProjectEvergreen/greenwood/issues/1118 - return [{ - input, + return input.map(filepath => ({ + input: filepath, output: { dir: normalizePathnameForWindows(outputDir), entryFileNames: '_[name].js', @@ -423,7 +421,7 @@ const getRollupConfigForSsr = async (compilation, input) => { } } - }]; + })); }; export {