summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.changeset/cold-eyes-run.md5
-rw-r--r--packages/astro/src/core/add/index.ts2
2 files changed, 6 insertions, 1 deletions
diff --git a/.changeset/cold-eyes-run.md b/.changeset/cold-eyes-run.md
new file mode 100644
index 000000000..8775c1919
--- /dev/null
+++ b/.changeset/cold-eyes-run.md
@@ -0,0 +1,5 @@
+---
+'astro': patch
+---
+
+Add export keyword to astro config file stub created by add cli command
diff --git a/packages/astro/src/core/add/index.ts b/packages/astro/src/core/add/index.ts
index 95892d80f..fe75c42c7 100644
--- a/packages/astro/src/core/add/index.ts
+++ b/packages/astro/src/core/add/index.ts
@@ -38,7 +38,7 @@ const ALIASES = new Map([
['solid', 'solid-js'],
['tailwindcss', 'tailwind'],
]);
-const ASTRO_CONFIG_STUB = `import { defineConfig } from 'astro/config';\n\ndefault defineConfig({});`;
+const ASTRO_CONFIG_STUB = `import { defineConfig } from 'astro/config';\n\nexport default defineConfig({});`;
const TAILWIND_CONFIG_STUB = `/** @type {import('tailwindcss').Config} */
module.exports = {
content: ['./src/**/*.{astro,html,js,jsx,md,svelte,ts,tsx,vue}'],