-
Notifications
You must be signed in to change notification settings - Fork 983
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
Parse error for Polymer 3.0.0-pre.12 #363
Comments
@justinfagnani this is a problem with our import tracing/compiling; since example.js is being dynamically imported the Besides the upcoming static asset support we've chatted about, this can be solved in 2 ways right now:
I know this is not super ideal- our upcoming upgrades to the bundler and dev server should completely eliminate all of these weird quirks though. Thanks for hanging in there :) |
Shouldn't it be fine if the file isn't transpiled? Seems like some other part of the toolchain doesn't have an up-to-date parser maybe. In our case we can't use a normal JS import, because we have to wait for the polyfills to load before running app code. I tried using our blocking polyfill loader, but without complete control over index.html, the script tag for index.js is being inserted before the polyfill script tags, making the blocking/document.write behavior not work. |
In order for ESM modules to be added to System's registry it needs to be compiled to either System.register or CJS format. With static asset support you'll be able to leverage module scripts though, which (obv) doesn't require any compilation/etc. Regarding polyfill loader/scripts in index.html: all scripts listed in index.html should be loaded & executed in order. Are you seeing this behave otherwise? |
What I was seeing for the blitz above was that the injected script tag for index.js was being run before the script tags I had statically in index.html. I'd rather add my own script tag for index.js and have full control. |
Were you placing the script tag in Adding own script tag for index.js will be enabled w/ new dev server static asset support :) |
I'll try it again and report back. Awesome news again :) |
Thank you for your patience - The latest project link is no longer working and we are unable to move forward with this issue and will be closing this accordingly. We are launching new core technology into beta this month that should resolve this issue. If this issue persists, feel free to tag me or reopen this issue with a working project link and screenshots of the error. Thank you! :) |
See this blitz: https://stackblitz.com/edit/hello-polymer-3?file=example.js
Not sure what the error here is, the module loads in Chrome.
The text was updated successfully, but these errors were encountered: