How to transpile external dependency in angular-cli?

ε祈祈猫儿з 提交于 2019-12-07 03:43:56

问题


I have an angular-cli application and i use Angular IMask Plugin. Angular IMask Plugin wraps vanila imaskjs which has "package.module" in es2015 format alongside with "package.main" in es5 umd format. While building angular-cli takes "package.module" but does not transpile it with babel and therefore my app does not work in IE.

How can i configure angular-cli to include imaskjs to be transpiled? It could be solved in webpack like this https://github.com/uNmAnNeR/imaskjs/issues/24 But what about angular-cli? Is eject is the only solution?

Is it ok to distribute "package.module" in es2015 format for libraries or it should be in es5 as well?

来源:https://stackoverflow.com/questions/48221521/how-to-transpile-external-dependency-in-angular-cli

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!