This is an Astro integration that allows to retrieve astro configuration object at runtime
- Astro 4.14+
Install the integration automatically using the Astro CLI:
pnpm astro add astro-runtime-config
npx astro add astro-runtime-config
yarn astro add astro-runtime-config
Or install it manually:
- Install the required dependencies
pnpm add astro-runtime-config
npm install astro-runtime-config
yarn add astro-runtime-config
- Add the integration to your astro config
+import astroRuntimeConfig from "astro-runtime-config";
export default defineConfig({
integrations: [
+ astroRuntimeConfig(),
],
});
This package is structured as a monorepo:
-
playground
contains code for testing the package -
package
contains the actual package
Install dependencies using pnpm:
pnpm i --frozen-lockfile
Start the playground and package watcher:
pnpm dev
You can now edit files in package
. Please note that making changes to those files may require restarting the playground dev server.
MIT Licensed. Made with ❤️ by Dovias.