generated from alecodes/base-template
build: simplify build & run process of FE files
use external bun packages to bundle files, run this package in the build.rs script
This commit is contained in:
parent
e379967907
commit
6ee345763f
6 changed files with 40 additions and 77 deletions
|
|
@ -1,20 +0,0 @@
|
|||
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