Skip to content

Commit

Permalink
build from build directory, copy static folder to build
Browse files Browse the repository at this point in the history
  • Loading branch information
terrablue committed Jul 16, 2024
1 parent cff72a2 commit d642f3d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/primate/src/hooks/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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 => {
Expand Down

0 comments on commit d642f3d

Please sign in to comment.