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

Using astro add [...] with empty defineConfig() not automatically adding integration to config #11836

Closed
1 task
lorenzolewis opened this issue Aug 25, 2024 · 0 comments · Fixed by #11772
Closed
1 task
Labels
- P2: nice to have Not breaking anything but nice to have (priority)

Comments

@lorenzolewis
Copy link
Contributor

Astro Info

Astro                    v4.14.5
Node                     v20.16.0
System                   macOS (arm64)
Package Manager          pnpm
Output                   static
Adapter                  none
Integrations             none

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

When using astro add with an empty Astro config (example below) then the CLI will not recommend nor add the integration to the Astro config file.

Example config file:

import { defineConfig } from "astro/config";

// https://astro.build/config
export default defineConfig();

Even without the object, this is still a valid config (or at least will build).

What's the expected result?

The CLI should prompt with a code change to add the object parameter to the config in addition to the normal recommendation to add the integrations: [exampleIntegration()] code within that object.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-zsaoce?file=astro.config.mjs

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Aug 25, 2024
@lorenzolewis lorenzolewis changed the title Using astro add [...] with empty defineConfig() not automatically adding integration Using astro add [...] with empty defineConfig() not automatically adding integration to config Aug 25, 2024
@ematipico ematipico added - P2: nice to have Not breaking anything but nice to have (priority) and removed needs triage Issue needs to be triaged labels Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P2: nice to have Not breaking anything but nice to have (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants