astro-repl
astro-repl copied to clipboard
component filename increment problem and default import
- component filename increment problem Step to reproduce:
- Add new component => shown component.astro
- Add new component => shown component1.astro
- delete component.astro
- create new component => shown component.astro
- create new component (❌ user couldn't add new component)
screenshot:

- removing default import when add new component just thought that if we add default import syntax to Page.astro, it could be a problem in the future when user delete component.astro, import syntax is still there. my suggestion was keep user importing manually since the mental model from developer to just import when it's needed (this behavior is common in svelte repl)
Or perhaps a button when on the Component.astro "tab" that when manually clicked adds the import statement to the top of Page.astro. Would be helpful if it switched you back to Page.astro and highlighted the added line.
@leoj3n That might work, I'll see if there is a way to implement something like that