掲示板

Disable Promise Polyfill in Liferay AMD Loader?

7年前 に Michael Freeman によって更新されました。

Disable Promise Polyfill in Liferay AMD Loader?

Junior Member 投稿: 37 参加年月日: 12/07/02 最新の投稿
The basic description on GitHub for the AMD loader that is embedded into DXP talks about two forms of the loader:

o loader.js - which comes with ES6 Promise polyfill
o loader-pure.js - version without Promise polyfill.

It appears that by default, DXP uses the first one and includes its own Promise polyfill. I am trying to do some development with Angular 2 which really wants to use Zone.js that has its own supplied Promise polyfill. I have tried a couple of different approaches, but the net seems to be that if the DXP loader and Zone.js are each attempting to provide their own polyfile for Promise I can never make both completely happy....

So is there some way to get the DXP loader to use the "loader-pure.js" version and then I make sure a Promise polyfill has been instantiated before the loader runs?