Gleam language plugin to vitejs.
Vite config vite.config.js:
import { resolve } from "vite";
import { defineConfig } from "vite";
// type to plugin options
import gleam from "vite-plugin-gleam";
import {type GleamPlugin} from "./src/project";
export default defineConfig({
plugins: [
// gleam plugin options
gleam({
// gleam root dir project
cwd: ".", // process.cwd() is default
// gleam binary path
bin: "gleam",
log: {
// "info" | "debug" | "trace" | "none"
level: "info",
// if put date and time
time: true
},
build: {
// gleam build arg to break on warnings
warningsAsErrors: true,
// gleam build arg to show or not cmd output
noPrintProgress: false
}
} as GleamPlugin)
],
resolve: {
alias: {
// vite aliases to gleam build dir
'@gleam': resolve(__dirname, "./build/dev/javascript")
}
}
})- bun-plugin-gleam-demo
- bunup-plugin-gleam-demo
- vite-plugin-gleam-demo
- vite-ts-plugin-gleam-demo
- vite-lustre-plugin-gleam-demo
- Unit tests
- More docs
- GH workflow
- test
- build
- changelog & issue to doc
-
auto publishmanual publish-
npm publish
-
- Pure gleam code