Is there a way to prevent the Angular instance from injecting into the global (window) scope when required and bundled with webpack or any other module bundler?
Upon inspection, I discovered that the current main Javascript file in the Angular npm package is:
require('./angular');
module.exports = angular;
The contents of my webpack entry file are as follows:
import angular from 'angular';
// custom code here
Although the main task of webpack is to avoid leaking variables into the global scope, if I log angular in Chrome DevTools like this:
console.log(angular); // => Object {version: Object, callbacks: Object}
I can see that the angular instance is still injected. Any suggestions on how to prevent this?
Additional information:
Angular.js version - 1.6.0-rc.0
Webpack version - 2.1.0-beta.27
Update.