From e82ff13f18e8776844555fe3acd2b366cf8f1e11 Mon Sep 17 00:00:00 2001 From: Mihkel Eidast Date: Tue, 19 Jul 2022 18:55:59 +0300 Subject: [PATCH] fix: add export keyword to file stub (#3944) --- .changeset/cold-eyes-run.md | 5 +++++ packages/astro/src/core/add/index.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/cold-eyes-run.md 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}'],