⚙️ Config
mostir uses a mostir.config.mjs file at the project root.
Options
-
build (required)
Any esbuild options.- Common keys:
entryPoints,outdir,platform,format,target, etc.
- Common keys:
-
ignore (optional)
Glob patterns to exclude.
Applies to:- build (when
entryPointsis a glob string) - sync (non-TS file mirroring & folder sync)
- diff / hash (future roadmap)
- build (when
Example Config
// mostir.config.mjs
const ignore = [
"**/*.test.ts",
"**/__tests__/**",
"**/*.d.ts",
];
export default {
build: {
entryPoints: "src/**/*.ts",
outdir: "dist",
platform: "node",
format: "esm",
target: "es2022",
bundle: false,
external: ["fs", "path"],
sourcemap: true,
minify: false,
logLevel: "info",
outbase: "src",
metafile: true,
},
ignore,
};
Example Type
import type { BuildOptions } from "esbuild";
export interface MostirConfig {
build: BuildOptions;
ignore?: string[];
}
Notes / Common pitfalls
export defaultis required inmostir.config.mjs.outfileandentryPoints(glob) cannot be used together.--sync/--cleanare not supported when usingoutfile.