Set a clear .astro
directory structure
#887
Replies: 3 comments 7 replies
-
Love this 😄 How would you imagine this For reference, a way to include |
Beta Was this translation helpful? Give feedback.
-
Will this make it easier to do type generation? |
Beta Was this translation helpful? Give feedback.
-
Changes have been made |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Body
Summary
Create a clear structure in
.astro
, for core and integrationsBackground & Motivation
Back in February, I started working on withastro/astro#9952, innocently thinking that it would be easy. The goal was initially to do some tsconfig magic, then I scoped it down to allow integrations to inject types, then it was still too much so I closed it.
I uncovered that it requires a few things, including a rework of the
.astro
dir structure. According to @Princesseuh, it was initially planned for 4.0 but got postponed because of the Dev Toolbar.Anyway, why do we need a clear structure? With more and more core and integrations features relying on codegen, the risk of collisions is increasing. The DX is not so great, and types require adding references in
src/env.d.ts
.The goal is to unify all of this in a coherent structure.
Goals
.astro
structure.astro
directoryNon goals
Example
Beta Was this translation helpful? Give feedback.
All reactions