generated from alecodes/base-template
refactor: re-structure frontend code
This commit is contained in:
parent
6b7642b693
commit
3e0dd79217
11 changed files with 101 additions and 7 deletions
12
.justfile
12
.justfile
|
|
@ -20,15 +20,21 @@ build-frontend:
|
|||
#!/usr/bin/env bun
|
||||
import sassPlugin from "@alecodes/bun-plugin-sass";
|
||||
|
||||
const entrypoints = Array.from(
|
||||
new Bun.Glob("frontend/**/*.html").scanSync(".")
|
||||
);
|
||||
|
||||
const result = await Bun.build({
|
||||
entrypoints: ["templates/base.html"],
|
||||
entrypoints,
|
||||
outdir: "dist",
|
||||
publicPath: "/",
|
||||
splitting: true,
|
||||
plugins: [sassPlugin],
|
||||
naming: {
|
||||
entry: "[dir]/[name].[ext]",
|
||||
chunk: "chunks/[name]-[hash].[ext]",
|
||||
chunk: "assets/[name]-[hash].[ext]",
|
||||
asset: "assets/[name]-[hash].[ext]",
|
||||
},
|
||||
plugins: [sassPlugin],
|
||||
});
|
||||
|
||||
console.log("Assets compiled!");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue