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

Edge 17 / FF (current) error with legacy method of integration #7

Open
btopro opened this issue Apr 17, 2019 · 8 comments
Open

Edge 17 / FF (current) error with legacy method of integration #7

btopro opened this issue Apr 17, 2019 · 8 comments

Comments

@btopro
Copy link

btopro commented Apr 17, 2019

My implementation code:

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
    <title>GameShowQuiz: game-show-quiz Demo</title>
    <script src="../node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
    <script>window.Promise || document.write('<script src=https://unpkg.com/zousan><\/script>');</script>
    <script defer src="https://unpkg.com/dimport/legacy" data-main="/dimport-test/game-show-quiz.js"></script>
  </head>

Screenshots of the errors are attached:

Edge 17:

Edge 17 error

Firefox (latest version):

Firefox error

@lukeed
Copy link
Owner

lukeed commented Apr 17, 2019

Thanks~! I'd need to see your scripts' source in order to find the issue(s). It's apply rewrites to your statements, so I have to see where it's falling apart.

If it's sensitive, you can DM me 👍

@btopro
Copy link
Author

btopro commented Apr 17, 2019

Polymer build routine w/ keeping the modules relative to one another. Here's a temporary link we were testing
https://courses.aanda.psu.edu/arth111/sites/courses/aa/arth111/files/dimport-test/demo/index.html

@btopro
Copy link
Author

btopro commented Apr 17, 2019

I can also report that no modules / modules methodology was failing on firefox as well complaining that ./node_modules/@polymer/... couldn't be resolved; does it maybe need something to work when not a top level domain?

@btopro
Copy link
Author

btopro commented Apr 17, 2019

TypeError: Error resolving module specifier: ./node_modules/@polymer/polymer/polymer-element.js would seem to suggest that (put that in a demo too) -- https://courses.aanda.psu.edu/arth111/sites/courses/aa/arth111/files/dimport-test/demo/modules.html

@lukeed
Copy link
Owner

lukeed commented Apr 17, 2019

The last comments (re: ./node_modules) is a separate issue that I can resolve tonight. No need to open another ticket.

By the way, the type=nomodule is incorrect. This is my bad as the initial docs & example pages included that typo. It should be <script nomodule src="..."> and <script type="module" src="...".

I'll investigate further and fix what I find after the workday.
Thanks!

@btopro
Copy link
Author

btopro commented Apr 17, 2019

(fixed other link to reflect it) awesome! If it needs testing at some point I'm happy to keep trying. This would be an absolute game changer for web component implementation routines so very excited about this project / concept.

@lukeed
Copy link
Owner

lukeed commented Apr 17, 2019

Thanks! You may want to try shimport too by the way, since you're already using the legacy modes.

My thoughts now (again, having done very little inspection) are that the webcomponent model may be throwing the wrapper for a loop. I wrote it expecting scripts only, so tbh I'm not sure how it's handling the SFC format, with HTML & CSS present.

🤷‍♂️ Interested to find out

@btopro
Copy link
Author

btopro commented Apr 17, 2019

yea was looking at that too. just interested in seeing what I can make work; most likely I'd feature detect usage of legacy for IE11 builds (since it would have to be ES5 compiled anyway) and then ES6 via the modules/nomodules gig would hit a pretty wide net of web component capable browsers.

They DO have html/css in them but all imports are valid js files so hopefully just a parser issue.

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

No branches or pull requests

2 participants