Support AOT-built static assets (#1999)
Creates a static folder under `config.build.outDir` during AOT build. Serves any static files that are found there. --------- Co-authored-by: Marvin Hagemeister <marvin@deno.com>
This commit is contained in:
co-authored by
Marvin Hagemeister
parent
d655386617
commit
264f3073bd
@@ -14,6 +14,9 @@ export async function build(
|
||||
// Ensure that build dir is empty
|
||||
await emptyDir(outDir);
|
||||
|
||||
// Create a directory for static assets produced during the build
|
||||
await Deno.mkdir(join(outDir, "static"));
|
||||
|
||||
await Promise.all(plugins.map((plugin) => plugin.buildStart?.(state.config)));
|
||||
|
||||
// Bundle assets
|
||||
|
||||
Reference in New Issue
Block a user