generated from alecodes/base-template
build: add docker build files
This commit is contained in:
parent
1871610770
commit
3c2d3cf720
6 changed files with 262 additions and 23 deletions
20
.devfiles/scripts/build-frontend.ts
Normal file
20
.devfiles/scripts/build-frontend.ts
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import sassPlugin from "@alecodes/bun-plugin-sass";
|
||||
|
||||
const entrypoints = Array.from(
|
||||
new Bun.Glob("frontend/**/*.html").scanSync("."),
|
||||
);
|
||||
|
||||
const result = await Bun.build({
|
||||
entrypoints,
|
||||
outdir: "dist",
|
||||
publicPath: "/",
|
||||
splitting: true,
|
||||
plugins: [sassPlugin],
|
||||
naming: {
|
||||
entry: "[dir]/[name].[ext]",
|
||||
chunk: "assets/[name]-[hash].[ext]",
|
||||
asset: "assets/[name]-[hash].[ext]",
|
||||
},
|
||||
});
|
||||
|
||||
console.log("Assets compiled!");
|
||||
Loading…
Add table
Add a link
Reference in a new issue