API
@natui/core/config
Load and validate the NatUI application configuration.
The @natui/core/config entrypoint exposes the same static
natui.app.json loader used by natui dev and the repository packager.
import { loadAppConfig } from '@natui/core/config';
const config = await loadAppConfig();
console.log(config.entryPath);
console.log(config.icons.macos);loadAppConfig(configPath?, options?) resolves entry, output, and icon paths
relative to the config file. It defaults to natui.app.json in the current
working directory and throws when that file is missing. Pass the options object
as the second argument, as in
loadAppConfig(undefined, { allowMissing: true }), when a missing config
should return undefined instead of throwing.
validateAppConfig() validates an already parsed value. It rejects unknown
properties, absolute paths, and paths that escape the application directory.
Prop
Type
Prop
Type