Created
April 2, 2025 05:28
-
-
Save ImKubass/82e738b0bc4f1d68a26af726d5cd4964 to your computer and use it in GitHub Desktop.
Esbuild example with scss, svg and tailwind
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as esbuild from "esbuild" | |
import {sassPlugin} from "esbuild-sass-plugin" | |
import manifestPlugin from "esbuild-plugin-manifest" | |
import svgPlugin from "esbuild-svg" | |
import tailwindPlugin from "esbuild-plugin-tailwindcss" | |
await esbuild.build({ | |
entryPoints: ["./src/index.ts"], | |
bundle: true, | |
outdir: "./dist", | |
minify: true, | |
sourcemap: true, | |
splitting: true, | |
format: "esm", | |
plugins: [ | |
tailwindPlugin(), | |
svgPlugin(), | |
sassPlugin(), | |
manifestPlugin({ | |
shortNames: true, | |
}), | |
], | |
entryNames: "[dir]/[name]-[hash]", | |
logLevel: "info", | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment