question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IE Failure Due to Incomplete Transpilation

See original GitHub issue

Versions

<!--
Output from: `ng --version`.
If nothing, output from: `node --version` and `npm --version`.
  Windows (7/8/10). Linux (incl. distribution). macOS (El Capitan? Sierra?)
-->

Angular CLI: 1.6.3 Node: 8.9.4 OS: win32 x64 Angular: 5.1.2 … animations, common, compiler, compiler-cli, core, forms … http, language-service, platform-browser … platform-browser-dynamic, router

@angular/cli: 1.6.3 @angular-devkit/build-optimizer: 0.0.36 @angular-devkit/core: 0.0.22 @angular-devkit/schematics: 0.0.42 @ngtools/json-schema: 1.1.0 @schematics/angular: 0.1.11 @schematics/schematics: 0.0.11 typescript: 2.6.2 webpack: 3.10.0

Repro steps

  • Step 1 npm install this Ella Framework repro
  • Step 2 npm start to observe it compiles, works in Chrome, fails in IE
  • Step 3 npm run build-dev to observe output /dist/vendor.bundle.js contains arrow functions and other invalid es5 syntax.

Observed behavior

<!-- Normally this includes a stack trace and some more information. -->

1 - App works in Chrome 2 - App has syntax failure in IE 3 - building to disk results in invalid es5

Desired behavior

1 - Building to disk should reflect proper es5 target as specified in tsconfig.json 2 - IE10 should be fully supported, when building to disk or using Webpack dev server 3 - Ideally / optionally, webpack’s config can be exposed so advanced projects can have finely-tuned control over transpilation and configuration to stop gap or workaround issues until/if Angular CLI solutions are officially implemented.

Mention any other details that might be useful (optional)

polyfills.ts was uncommented as expected for IE support in an Angular 5 project.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
Vandiviercommented, Jan 24, 2018

In case anyone stumbles on to this issue, replacing dependency code is not always feasible. But there is a relatively simple solution. In fact I could submit a PR to easily integrate it into Angular CLI

Just transpile the output folder using babel

Step 1, package.json "build-dev": "ng build" Step 2, CLI: npm run build-dev Assume this outputs a folder called dist Step 3, in package.json "babel": "babel dist --out-dir dist" Step 4, in CLI: npm run babel

Observe dist is there, but javascript from any number of dependencies has been centrally transpiled.

0reactions
angular-automatic-lock-bot[bot]commented, Sep 8, 2019

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[BANano] Incomplete transpilation or what I miss | B4X Programming ...
I tried to run this function (I don't want to use BANanoFetch here) Private Sub getTimeWait() As BANanoObject 'ignore Dim fetch As BANanoObject...
Read more >
How to transpile CoffeeScript to JavaScript (last 2 versions ...
How to transpile CoffeeScript to JavaScript (last 2 versions and ie >= 11) using Browserify and coffeeify transform? Ask Question. Asked 3 years ......
Read more >
When IE11 dies in 2022, can all polyfills and transpilations ...
Longer and more detailed answer: You're asking at least two different questions and they confuse the subject. You should be supporting any version...
Read more >
But I really do need to transpile node_modules
I do understand that this is not best practice. It could break code that someone else has written; It slows down transpilation.
Read more >
The 10 Most Common JavaScript Issues Developers Face
In most other languages, the code above would lead to an error because the “life” (i.e., scope) of the variable i would be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found