From d642f3d2cdf8ccc62985c5aa376f4e4d384a9c62 Mon Sep 17 00:00:00 2001 From: terrablue <102580937+terrablue@users.noreply.github.com> Date: Mon, 15 Jul 2024 12:25:25 +0200 Subject: [PATCH] build from build directory, copy static folder to build --- packages/primate/src/hooks/build.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/primate/src/hooks/build.js b/packages/primate/src/hooks/build.js index 6f1606f2..1f5ffe38 100644 --- a/packages/primate/src/hooks/build.js +++ b/packages/primate/src/hooks/build.js @@ -17,7 +17,7 @@ const pre = async (app, mode) => { ...O.exclude(app.get("build"), ["includes", "index", "transform"]), outdir: app.runpath(app.get("location.client")).path, stdin: { - resolveDir: app.root.path, + resolveDir: app.root.build.path, }, }, mode); @@ -75,6 +75,9 @@ const post = async app => { // copy static files to build/client/static await app.stage(path.static, File.join(location.client, location.static)); + // copy static files to build/static + await app.stage(path.static, File.join(location.static)); + // publish JavaScript and CSS files const imports = await File.collect(path.static, /\.(?:css)$/u); await Promise.all(imports.map(async file => {