-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix bundle-config-loader #8838
fix bundle-config-loader #8838
Conversation
Thank you @farfromrefug ! |
9c97150
to
f7713c4
Compare
069dbb9
to
8b11d11
Compare
@NathanWalker can you guys test this on your side before we publish this? |
Actually already released:) hope it won't break somewhere:) |
@NathanWalker what happened here? That PR seems messed up. DOes not link to my branch anymore master...Akylas:bundle-entry-points And the issue is still here #8872 |
@NathanWalker sorry misread ! But wait why is it my description if not my PR? What s going on here? |
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