콘텐츠로 이동

defineConfig

defineConfig<T>(config): T

Defined in: core/index.ts:353

zntc.config.{ts,js} 의 타입 체크 / 자동완성을 위한 identity helper.

객체 config 와 함수형 config 를 모두 지원한다.

T extends UserConfigInput

T

T

import { defineConfig } from "@zntc/core";
export default defineConfig({
entryPoints: ["src/index.ts"],
format: "esm",
sourcemap: true,
});
import { defineConfig } from "@zntc/core";
export default defineConfig(({ command, mode, env }) => {
const production = command === "bundle" && mode === "production";
return {
entryPoints: ["src/index.ts"],
minify: production,
define: {
__APP_ENV__: JSON.stringify(env.ZNTC_APP_ENV ?? mode),
},
};
});