From cc050a7cc3d725399b3c81977fe30aecd5b4ccfa Mon Sep 17 00:00:00 2001 From: Evan Boehs Date: Tue, 25 Jan 2022 12:49:38 -0500 Subject: [PATCH] Add note about imports to migration guide (#2467) * Update 0.21.0.md * Improve grammar * add bug note --- docs/src/pages/en/migration/0.21.0.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/src/pages/en/migration/0.21.0.md b/docs/src/pages/en/migration/0.21.0.md index 971635203d..d88e947a67 100644 --- a/docs/src/pages/en/migration/0.21.0.md +++ b/docs/src/pages/en/migration/0.21.0.md @@ -62,6 +62,19 @@ const backgroundColor = "rgb(24 121 78)"; ``` +## Imports on top bug + +In Astro v0.21, a bug has been introduced that requires imports inside components to be at the top of your frontmatter. + +```astro +--- +import Component from '../components/component.astro' +const whereShouldIPutMyImports = "on top!" +--- +``` + +*Note: This is a bug that will be fixed.* + ## Components in Markdown In Astro v0.21, Components from any framework can be used within Markdown files.