-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Get rid of require() in vendor.ts #236
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
Comments
this works but I was trying to be more consistent showing that modules where we want to toggle features per enviroment should use require |
I see. Frankly I'd rather do not mix different module format styles in an app unless there is no way to avoid |
we still have to mix import and require :/ even with webpack2. I'm mixing both to stay consistent in case the devloper deletes the |
Currently
vendor.ts
usesrequire()
to import theenableProdMode
function fromangular2/core
:Can we combine the function import together with the ES6 import statement below in the file?
My understanding is that all required objects from
angular2/core
still will be bundled since the application code explicitly imports everything it needs. However I lack the knowledge of Webpack's bundling process and concerned that some of the objects fromangular2/core
can leak into thebundle.js
file instead of being invendor.bundle.js
.I did a quick experiment it seems that everything is fine, works as intended, but maybe I'm missing a common case when it won't work. What do you think?
The text was updated successfully, but these errors were encountered: