IE Failure Due to Incomplete Transpilation
See original GitHub issueVersions
<!--
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:
- Created 6 years ago
- Reactions:1
- Comments:7 (1 by maintainers)
Top GitHub Comments
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 calleddist
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.
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.