-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Not possible to create a web component from more than one .svelte file #4571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Could you provide a repro, including DatePicker.svelte and other svelte files? |
We have set up a temporary repo: Clone and then: Then open the So currently we either have two errors. If we add the option only on the main component:
If we set on all components:
Then we also tried to add an option in every components with different values, but anyway we run into other issues. |
@thojanssens I solved this using Rollup config and file extensions. Here's a demo: https://jawish.github.io/svelte-customelement-rollup/ |
I have a
DatePicker
component, composed of different.svelte
files.I added
<svelte:options tag="date-picker"/>
only in the mainDatePicker.svelte
component, but when runningnpm run build
, I got the error message:Then I tried adding that option in every
.svelte
component; the message disappeared, but when viewing the component in the browser, I had the error message:This is the rollup file:
The text was updated successfully, but these errors were encountered: