Skip to content
This repository has been archived by the owner on Feb 21, 2024. It is now read-only.

defineCustomElements is not defined #37

Open
HarshRohila opened this issue Oct 27, 2019 · 4 comments
Open

defineCustomElements is not defined #37

HarshRohila opened this issue Oct 27, 2019 · 4 comments

Comments

@HarshRohila
Copy link

I tried to use this function on the target app (on which I want to use the web component).
I also tried to use this in the Ember app (in which component exists).

@adrigzr
Copy link
Contributor

adrigzr commented Oct 28, 2019

Hi @HarshRohila,

You need to import it from the addon:

import defineCustomElements from 'ember-cli-web-components';

Regards!

@paladinu
Copy link

paladinu commented Jan 8, 2020

So does this approach only work for importing into other ember sites? I wanted to use it in a plain html site like your demo but there must be some steps missing as I can't get the element to render.

@adrigzr
Copy link
Contributor

adrigzr commented Jan 9, 2020

Hi @paladinu, it should work on any website. Maybe you are missing the Ember dependencies. In order for this to work, you need to import the vendor.js and the app.js of the app generated with web components in your target app.

@cstolli
Copy link

cstolli commented May 17, 2021

Hi @adrigzr, I have two questions, one is, what if you aren't building your components in an app? If your ember project is just components instead? Also, I'm wondering in general if it still makes sense to use this package. I notice it hasn't seen many updates in a while. Has it served its initial purpose for you, have you moved on to something else? Have you solved "reusing ember code in other applications" another way? Thanks for the consideration.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants