feat(components): add basic components
Some checks failed
Publish package / build_and_publish (push) Failing after 21s

This commit is contained in:
Alexander Navarro 2024-10-25 18:40:50 -03:00
parent ee567abf6b
commit d4a11146aa
11 changed files with 174 additions and 4 deletions

View file

@ -0,0 +1,32 @@
import { type BunPlugin } from "bun";
import dts from "bun-plugin-dts";
import styleLoader from "bun-style-loader";
import * as sass from "sass";
const style: BunPlugin = {
name: "Sass Loader",
setup(build) {
console.log("Running SASS Plugin...");
build.onLoad({ filter: /\.scss$/ }, async ({ path }) => {
const contents = sass.compile(path);
const css = contents.css;
return {
loader: "file",
contents: css,
};
});
},
};
const result = await Bun.build({
outdir: "dist",
publicPath: "public",
format: "esm",
plugins: [style],
entrypoints: ["./src/components.scss"],
});
if (!result.success) {
throw new AggregateError(result.logs, "Build failed");
}