Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As requested here is the PR again which fixes
This PR fixes a big issue which appeared with N 7 / esm / webpack
With webpack import / require order is not respected : webpack/webpack#1343
Now in bundle-config-loader we rely on
require
to loadbundle-entry-points
thus callinginitGlobals
and making tslib functions global.Because it uses
require
it actually end up at the end of yourmain.js
(simply look at a generated bundle.js)To keep that call up we need to use
import
But that is not enough!
in
bundle-entry-points
we use 'require' on 'globals'. And usingimport
is not enough either because we call a method on it which will end up after all imports!The solution to all this is call
initGlobal
insideglobal/index.ts
then useimport './global'
for example.Doing that i needed cleanup a bit and we end up with only on use of
initGlobal
EDIT: that app will crash on ios because of that. The reason is that i import View at the top of my main.ts which include files using
__metadata