#Import declaration conflicts with local declaration

7 messages · Page 1 of 1 (latest)

pulsar plover
#

Since I updated Astro I've been seeing a warning on a small Astro page

// preview.astro
---
import PreviewLayout from '../layout/preview.astro'
import Preview from '../components/preview.vue'
---
<PreviewLayout>
  <Preview client:only="vue" />
</PreviewLayout>
bleak mesa
#

Ah, it's a bug in our VS Code extension

#

I didn't take into account that someone would import a component with the same name as the current one

#

If you just import it under any other names, it should be fine, like

---
import PreviewVue from "../components/preview.vue";
---
pulsar plover
#

ok coolio, thanks!

#

fixed it cheers!

hollow gust