When using the Angular CLI sandbox and a tsconfig.app.json file to configure the "target" to es6, the compiler still transpiles .js files to ES5. In particular, if you look at the lit-element.js file which is a dependency, all the ES6 classes gets transpiled into ES5 causing the error:
updating-element.js? [sm]:75 Uncaught TypeError: Failed to construct 'HTMLElement': Please use the 'new' operator, this DOM object constructor cannot be called as a function.
Trying to use web components in Angular CLI in codesandbox without the es5-adapter. When I have this in my local enivonroment, using the same Angular CLI, I do not have this issue.
Link to sandbox not working without es5-adapter:
https://codesandbox.io/s/nrxlzl8754
Link to sandbox working with es5-adapter, but the adapter shouldn't be needed is the typescript transpiler is working properly:
https://codesandbox.io/s/538491qzmx
| Software | Name/Version|
Angular CLI
| 小odesandbox |
| Browser |
| Operating System |
Any news on this? I also need to use ES6 in my code, but cannot configure it to compile to ES6
Tried all sorts of tsconfig and browserslist placement and configurations. Please take a look, this issue is over a year old and not being able to use es2015 in 2020 is a darn shame. I'm limited to codesandbox because of all online Angular sandboxes it is the only one allowing uploading assets.
We also have problems with the impossibility for es2015 configuration - https://codesandbox.io/s/igx-grid-custom-summaries-jvpsf.
And now, given the fact that with the Angular 10 release "The Angular Package Format no longer includes ESM5 or FESM5 bundles", the severity of this issue should be escalated.
Apologies for the delay, I'm looking at this today and I'm aiming to fix it today as well!
Reopening to make sure that everyone can test before closing it, but the example of @HristoP96 is fixed with the last PR! I also saw that the sass transpiling is really slow, took a long time to compile that sandbox, so looking into that now.
The fix for this should be live in 20min!
Reopening to make sure that everyone can test before closing it, but the example of @HristoP96 is fixed with the last PR! I also saw that the sass transpiling is really slow, took a long time to compile that sandbox, so looking into that now.
The fix for this should be live in 20min!
@CompuIves The ES6/2015 configuration for Angular projects works as expected now and thank you very much for looking into this and provide a fix for it so quickly :)! Also, big thanks for the sass compile optimization, this will really improve the user experience in our topics!
Ahh that's awesome! Really cool, and great to hear that the issue has been resolved.
Thank you @CompuIves for the prompt reaction for both issues! 馃檹
Most helpful comment
We also have problems with the impossibility for es2015 configuration - https://codesandbox.io/s/igx-grid-custom-summaries-jvpsf.
And now, given the fact that with the Angular 10 release "The Angular Package Format no longer includes ESM5 or FESM5 bundles", the severity of this issue should be escalated.