From 2cd40856b6cef5b43bf7a59f6dfcc61bad5d5844 Mon Sep 17 00:00:00 2001 From: Mihkel Eidast Date: Sat, 16 Jul 2022 16:09:02 +0300 Subject: [PATCH] fix: add export keyword to file stub --- .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 000000000000..8775c1919b46 --- /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 95892d80f62f..fe75c42c71d6 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}'],