title: How to Migrate from AngularJS Module system to ES6 Modules
body: <p>We have a project that uses ES5 and relies upon Angular 1.x's module system. I've seen plenty of guides that say <a href="https://medium.com/@u_glow/upgrading-an-angular-es5-codebase-to-es6-85554288c08d" rel="nofollow noreferrer">"Step One: Re-write everything"</a>, but that's not really optimal for a large codebase that's changing hourly.</p>
  
  <p>Is there a way to make this painful change slightly more piecemeal? From what I've, it may be easier to completely migrate to Angular 2+ rather than get the benefits of ES6 using Angular 1.x.</p>
  
  <p>My initial thought would be to add import statements (commented out, to not break the build) at the top of each file, while still using Angular's module system. That way each ES6 module contains an AngularJS module. When all files have that, we uncomment the imports and change the build system over to webpack. Then we can go through one-by-one and ES6-ify the actual code as we have time.</p>