Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

astro:config virtual module #1099

Closed
ematipico opened this issue Jan 15, 2025 · 1 comment
Closed

astro:config virtual module #1099

ematipico opened this issue Jan 15, 2025 · 1 comment

Comments

@ematipico
Copy link
Member

Summary

Expose common Astro config properties to users and integrations

Background & Motivation

It happens quite often in userland to need the trailingSlash setting, or the base etc. Things that are available at import.meta.env and some that are not. The goal is to unify the way we expose this data.

Many integrations need this data and have to create virtual modules for this anwyays.

Goals

  • Have a unified way of exposing Astro config data
  • Pick properties, not include everything (eg. integrations)

Example

import { config } from 'astro:config'

config.trailingSlash
config.base
config.i18n.defaultLocale
@ematipico
Copy link
Member Author

Closed by #1106

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Stage 2: Accepted Proposals, No RFC
Development

No branches or pull requests

1 participant