Check out the docs for more information on how to use DMNO with Netlify.
If you have any questions, please reach out to us on Discord.
This package provides a set of prebuilt types and environment variables for Netlify.
npm add @dmno/netlify-platform
import { defineDmnoService, switchBy, pickFromSchemaObject } from 'dmno';
import { NetlifyEnvSchema } from '@dmno/netlify-platform/types';
export default defineDmnoService({
schema: {
...pickFromSchemaObject(NetlifyEnvSchema, 'CONTEXT', 'BUILD_ID'),
APP_ENV: {
value: switchBy('CONTEXT', {
_default: 'local',
'deploy-preview': 'staging',
'branch-deploy': 'staging',
production: 'production',
}),
},
},
});