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.

Build failing for IE 11

See original GitHub issue

Hi! I also noticed some problem with the transpilation build, I digged a bit into it, I have @ngforage/ngforage-ng5 installed in my package.json and I noticed some weird stuff, during transpilation of @angular/common the source code is taken from esm5 directory while for this ng-forage package it is taken from esm2015 and it causes my build to fail in IE11 because I get the code that contains class syntax, also as far as I remember I’ve also seen some code from zone.js to also not being transpiled properly. Could someone explain to me how does the resolving of package main file work ? It is very weird to me as every package, but the one mentioned above seems to transpile properly. I checked package.json of if and it looks fine:

"es2015": "dist/esm2015/index.js",
  "homepage": "https://github.com/Alorel/ngforage",
  "jsdelivr": "dist/umd/index.min.js",
  "license": "MIT",
  "main": "dist/es5/index.js",
  "module": "dist/esm5/index.js", <--- looks fine
  "name": "@ngforage/ngforage-ng5",

Versions

Angular CLI: 1.6.5
Node: 9.3.0
OS: win32 x64
Angular: 5.2.0
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cli: 1.6.5
@angular-devkit/build-optimizer: 0.0.41
@angular-devkit/core: 0.0.28
@angular-devkit/schematics: 0.0.51
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.5
@schematics/angular: 0.1.16
typescript: 2.6.2
webpack: 3.10.0

Repro steps

OR

Observed behavior

main.js file contains code with class keyword and the code from ngforage-ng5 is in ES6 version even though it should not

Desired behavior

main.js file should contain /dist/esm5/ version of ng-forage which is ES5 and IE11 ready

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
davidefaviacommented, Feb 9, 2018

I encountered the same problem importing es6 version of Swiper: vendors bundle contains class keyword even if I’m targeting es5. Just a workaround for the case if you have the opportunity:

  1. install library as global script,
  2. download types or declare them in src/typings.d.ts and DON’T import modules or declarations inside any .ts file.

This worked for me, hope it works also for someone else until this issue will be solved.

1reaction
JorgenPhicommented, May 16, 2018

+1

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webpack build fails for IE (11) - vue.js - Stack Overflow
Since it is a custom webpack configuration and it is not clear there is any additional configuration to babel, ...
Read more >
Webpack Build Fails to Render in IE11 | by Fernando Karnagi
Webpacker has a bug where it hard-codes UglifyJS options to { ecma: 8 } . So no matter how many Babel plugins you...
Read more >
not working on IE11 after 'yarn build' · Issue #4573 · vuejs/vue-cli
Browser compatibility: not working on IE11 after 'yarn build' #4573 ... shows 'ie 11' indeed, but codes in /dist/js/*.js still exist some ...
Read more >
Install problems with Internet Explorer 11 - Microsoft Learn
Internet Explorer didn't finish installing · Uninstall IE: · Run Windows Update, clicking Check for updates. · Check the list for IE11. ·...
Read more >
Is your Vue app not working in IE 11? Here's how to fix it.
The main reason why your Vue app is breaking in IE11 is because the browser does not support modern JavaScript syntax.
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