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 => {