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

[bug] Importing the WebComponents.js Custom Elements v1 polyfill from NPM breaks app? #7738

Closed
trusktr opened this issue Aug 30, 2016 · 6 comments

Comments

@trusktr
Copy link
Contributor

trusktr commented Aug 30, 2016

The only lines in the app are

import 'webcomponents.js/src/CustomElements/v1/native-shim'
import 'webcomponents.js/src/CustomElements/v1/CustomElements'

which results in a familiar yet unhelpful error:

   While computing assigned variables:
   node_modules/webcomponents.js/src/CustomElements/v1/native-shim.js: Unexpected token (30:17)

Reproduction:

git clone git@github.com:trusktr/meteor --branch issue-7738 --single-branch
cd meteor
./run-dev.sh

Note, I'm getting the webcomponents.js package from GitHub (see package.json).

@trusktr trusktr changed the title [bug] Importing the WebReflection Custom Elements v1 polyfill breaks Meteor app? [bug] Importing the WebReflection Custom Elements v1 polyfill from NPM breaks Meteor app? Aug 30, 2016
@trusktr
Copy link
Contributor Author

trusktr commented Sep 1, 2016

Opened reciprocal issue in webcomponents: webcomponents/webcomponentsjs#608

@WebReflection
Copy link

Why is my polyfill mentioned when the example imports webcomponents.js which is not my polyfill?

Has this bug anything to do at all with my polyfill?

@WebReflection
Copy link

@trusktr can you please change ASAP this title which blames for no reason my library? thank you

@WebReflection
Copy link

can anyone please update this ticket, changing the title to start with?

@trusktr trusktr changed the title [bug] Importing the WebReflection Custom Elements v1 polyfill from NPM breaks Meteor app? [bug] Importing the WebComponents.js Custom Elements v1 polyfill from NPM breaks Meteor app? Sep 9, 2016
@trusktr
Copy link
Contributor Author

trusktr commented Sep 9, 2016

@WebReflection Hi Andrea, I fixed the title. My mistake. (You can unsubscribe from this one if you want)

@trusktr trusktr changed the title [bug] Importing the WebComponents.js Custom Elements v1 polyfill from NPM breaks Meteor app? [bug] Importing the WebComponents.js Custom Elements v1 polyfill from NPM breaks app? Sep 9, 2016
@trusktr
Copy link
Contributor Author

trusktr commented Sep 9, 2016

The error was fixed, and the polyfill has been moved to a new repo, so the following lines now work:

import '@webcomponents/custom-elements/src/native-shim'
import '@webcomponents/custom-elements/src/custom-elements'

customElements.define('my-el', class MyEl extends HTMLElement {})

@trusktr trusktr closed this as completed Sep 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants