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

custom-elements-es5-adapter code not generated when using bundle and compile options together #563

Closed
zeeshanhyder opened this issue Jul 3, 2018 · 6 comments
Labels

Comments

@zeeshanhyder
Copy link

When building compile: true and bundle: true in polymer.json, custom-elements-es5-adapter code is not generated. However if i just use compile: true option, in that case, the code gets generated. Even if i manually put <script src=''./node_modules/@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js></script>, this tag gets read and code is transpiled, no matter even if i exclude it in compile option. Any inputs?

Node: 8.11
Polymer CLI: 1.7.7
Polymer: 3.0.2
Webcomponents: 2.0.2

@zeeshanhyder zeeshanhyder changed the title custom-elements-es5-adapter.js not generated when using bundle and compile options together custom-elements-es5-adapter code not generated when using bundle and compile options together Jul 3, 2018
@DavidHenri008
Copy link

I have a similar case where the <script src=''./node_modules/@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js></script> is not added to the built index.html file.
In my case, it happens when I define an exclude folder in my compile build configuration. However if I set compile at true it works.

Not Working:

"builds": [
    {
      "preset": "es5-bundled",
      "js": {
        "compile": {
          "exclude": ["help\\template\\scripts\\*.js"]
        }
      }
    }
  ],

Working:

"builds": [
    {
      "preset": "es5-bundled",
      "js": {
        "compile": true
      }
    }
  ],

Node: 8.11
Polymer CLI: 1.8.0
Polymer: 2.6.1
Webcomponents: 2.1.2

@zeeshanhyder
Copy link
Author

I think it probably has to do with how are they reading the value of compile option. Setting it to any other value other than true|false might be causing it to break. It's very weird the issue still persists. And apparently it's not a new one. It existed before as well.

@jsilvermist
Copy link
Contributor

What happens if you add the following to the build object?

"browserCapabilities": [
  "es5",
],

@DavidHenri008
Copy link

DavidHenri008 commented Sep 17, 2018

@jsilvermist I cannot run what you suggested since "es5" is not a valid option:

error: [cli.main] Promise rejection: Error: Property 'builds[0].browserCapabilities[0]' is not one of enum values: es2015,es2016,es2017,es2018,modules,push,serviceworker

Of course I need my code to be ES5 compatible...

@stale
Copy link

stale bot commented Mar 4, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale
Copy link

stale bot commented Apr 29, 2022

This issue has been automatically closed after being marked stale. If you're still facing this problem with the above solution, please comment and we'll reopen!

@stale stale bot closed this as completed Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants