destiny icon indicating copy to clipboard operation
destiny copied to clipboard

Cannot find import .yml file in svelte import

Open tqwewe opened this issue 4 years ago • 3 comments

When running this on my svelte app, I receive the following error:

ERROR: Cannot find import ../data/menu-items.yml for /src/components/layout/Header.svelte

My Header.svelte file contains:

import menuItems from '../data/menu-items.yml'
import type { Submenu } from '../data/menu-items.yml'

When I comment out the import type line, destiny runs fine, but the import type line causes it to fail.

tqwewe avatar Oct 26 '20 15:10 tqwewe

Hi @Acidic9 can share a reproduction (codesandbox, gh repo, etc...) ? Thanks.

AnatoleLucet avatar Oct 26 '20 16:10 AnatoleLucet

I think we just need to add yaml to https://github.com/benawad/destiny/blob/develop/src/index/shared/customResolve.ts

benawad avatar Oct 26 '20 16:10 benawad

I think we just need to add yaml to https://github.com/benawad/destiny/blob/develop/src/index/shared/customResolve.ts

Indeed

AnatoleLucet avatar Oct 26 '20 16:10 AnatoleLucet