Svelte: How do I fix - 'target' is a required option

Created on 19 Feb 2020  路  1Comment  路  Source: sveltejs/svelte

Hi I've ran into an issue and I'm quite stuck with what the cause is. I'm sure it's probably something silly but I need help spotting it.

Here is a codesandbox with a stripped down project - https://codesandbox.io/s/spring-frog-2f3jg
and here is the source of the component causing the error - https://github.com/bevirtuous/rooter/blob/Svelte/src/svelte/Route.svelte

Please point me in the right direction

>All comments

@richardgorman this is a usage question, rather than an issue with Svelte, and therefore doesn't belong on github issues.

You would probably get a good response by asking in the Svelte discord https://svelte.dev/chat or on StackOverflow with the tag svelte.

With regards to your issue though - what immediately sticks out to me is that
https://github.com/bevirtuous/rooter/blob/Svelte/src/svelte/Route.svelte should be using <svelte:component this={component} /> rather than <Component /> directly. Not sure if it's the issue, but it certainly doesn't look right in its current state.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ricardobeat picture ricardobeat  路  3Comments

plumpNation picture plumpNation  路  3Comments

robnagler picture robnagler  路  3Comments

rob-balfre picture rob-balfre  路  3Comments

Rich-Harris picture Rich-Harris  路  3Comments