Skip to content
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

Web component support #1736

Closed
sawden opened this issue Jun 22, 2021 · 3 comments
Closed

Web component support #1736

sawden opened this issue Jun 22, 2021 · 3 comments
Labels
p2-nice-to-have SvelteKit cannot be used by a small number of people, quality of life improvements, etc.
Milestone

Comments

@sawden
Copy link

sawden commented Jun 22, 2021

Describe the bug
I would like to develop web components with Svelte. For this I have set "compilerOptions" to true.
svelte.config.js

...
const config = {
	...,
	compilerOptions: {
		// enable web component mode
		customElement: true
	}
};
...

After my changes the App is broken and nothing works anymore.

Logs

Uncaught TypeError: Cannot read property 'page' of undefined
Uncaught (in promise) TypeError: Illegal constructor

To Reproduce

  1. Create n new SvelteKit Projekt and enable "customElement" mode.
  2. Add <svelte:options tag="component-NAME_HERE"/> to all components.
  3. Start the dev server.
  4. The App is broken and the console is full of errors.
@benmccann benmccann changed the title Web component mode braks the App Web component support Jun 23, 2021
@benmccann benmccann added the p2-nice-to-have SvelteKit cannot be used by a small number of people, quality of life improvements, etc. label Aug 5, 2021
@Rich-Harris Rich-Harris added this to the post-1.0 milestone Apr 26, 2022
@dummdidumm
Copy link
Member

Related #4502

@razshare
Copy link

Any news on this?

@dummdidumm
Copy link
Member

Closing in favor of #4502

@dummdidumm dummdidumm closed this as not planned Won't fix, can't repro, duplicate, stale Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2-nice-to-have SvelteKit cannot be used by a small number of people, quality of life improvements, etc.
Projects
None yet
Development

No branches or pull requests

5 participants