[PR WELCOME] Set language level for library sources (es5, es6, es7, dom, webworker, ...)
See original GitHub issueType of Issue
- Bug Report
- Feature Request
Description
I have made an application using a custom component library that I have implemented, and now i wanted to use ng-packagr to externalize my custom component library. The application was created by angular-cli, and i have followed the tutorial of Nikolas LeBlanc and the structure shown in the ng-packaged project.
For some reasons i have used in development es7 features like includes on arrays and padStart on strings. With the angular-cli builds including polyfills of core-js everything was working fine but the ng-packagr build gave me errors like this
Property 'includes' does not exist on type 'any[]'.
I have tried to include them as externals and import them in the components that required the functions but still have theses errors.
So, how can i add polyfills functions on the build ?
Version Information
ng-packagr: v1.3.0
node: v7.10.0
@angular: v4.1.3
rxjs: v5.4.2
zone.js: v0.8.14
core-js: v2.4.1
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
ECMAScript 2017 Language Specification | Hacker News
Javascript's language level string implementation is something like UCS-2 with the addition of surrogate pairs being allowed, but counted as ...
Read more >Shadow CLJS User's Guide
With this setting, the shadow-cljs command will use lein to launch the JVM, ignoring any :source-paths and :dependencies in shadow-cljs.edn ...
Read more >Using Web Workers - Web APIs - MDN Web Docs
You can run whatever code you like inside the worker thread, with some exceptions. For example, you can't directly manipulate the DOM from ......
Read more >ES5 to ESNext — here's every feature added to JavaScript ...
Introduction to ECMAScript. Whenever you read about JavaScript you'll inevitably see one of these terms: ES3, ES5, ES6, ES7, ES8, ES2015, ES2016 ...
Read more >How to create typescript library with webworkers using worker ...
js' , which would output a file for every file in your source folder, all on the same level in your _bundles folder....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Why duplicate the lib config in
ng-package.json
andtsconfig.json
? It should be possible to search for and read the developer’stsconfig.json
dynamically to determine what libs should be included. This could be accompanied by a field to specify a custom tsconfig file such as:It would also be nice to dynamically search .angular-cli.json for the tsconfig.
What is the workaround for this? If there is no workaround, I can’t use
ng-packagr
until it is implemented.