PonchoP
Denoβ€’2y agoβ€’
2 replies
Poncho

Module not found error when importing plugin islands

I'm trying to add islands to my plugin so that they "will treat them the same way as if they had been placed inside the islands/ directory." according to the docs (https://fresh.deno.dev/docs/concepts/plugins#islands). But when I try to import my island with:
import Chiplist from '@/islands/Chiplist.tsx'; I get a "Module not found" error. Any ideas on why would be appreciated.

This is how I'm adding the islands to my plugin:
export default function lunchboxPlugin(): Plugin {
  return {
    name: 'lunchbox',
    islands: {
      baseLocation: import.meta.url,
      paths: [
        './src/components/organisms/Chiplist/Chiplist.tsx',
      ],
    },
  };
}

Thank you
Was this page helpful?