1

I am trying to migrate Angular.js app to the hybrid one. The code was really old so at first I changed all the controllers to the components and I would like to introduce Webpack for Angular.js now before I will use ng-upgrade tool.

I already installed webpack, created a config file but I am looking through some tutorials and they are working with export modules. The app we are changing is quite big so is there any way I could have Webpack but without exporting angular.js modules as es6 modules? Do I need to change all dependency into the import statements?

1 Answer 1

1

Yes. You will have to convert all that into import statements, though it does not require ES6-Modules (we chose CommonJS modules).

When we migrated our huge AngularJS App (bower, TypeScript, global namespaces) to webpack we also necessarily had to do the step of packing everything to exported modules and migrate from bower to npm.

However, the whole change was less effort than we feared before, and we never regretted our decision. :-)

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks a lot. Do you have some sort of guidelines you have followed while migrating to Webpack?
Sorry, nothing in general... But as we did this, we took the chance of migrating some of the small parts to AngularJS components on the way (though it wasn't required to do so) for a better overall architecture and better future ease of migration to Angular.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.