summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Mihkel Eidast <mihkel@eida.st> 2022-07-19 18:55:59 +0300
committerGravatar GitHub <noreply@github.com> 2022-07-19 10:55:59 -0500
commite82ff13f18e8776844555fe3acd2b366cf8f1e11 (patch)
tree0ab52719d973678d4eb0bde0901515811f26dfff
parent54865612ea412f3d6d9a986d9dc6d4bebb7c8a63 (diff)
downloadastro-e82ff13f18e8776844555fe3acd2b366cf8f1e11.tar.gz
astro-e82ff13f18e8776844555fe3acd2b366cf8f1e11.tar.zst
astro-e82ff13f18e8776844555fe3acd2b366cf8f1e11.zip
fix: add export keyword to file stub (#3944)
-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}'],