in this post I’d like to discuss how we can migrate from Grunt to Webpack.
We have a lot of custom tasks for Grunt and rewriting them to Webpack will take some time. Fortunately we can use Webpack in Grunt just for the build and leave all of the custom tasks for now. We can use grunt-webpack - npm for this.
We have a custom task for the build, which copies and bundles all of the css and js files manually, Webpack will do this automatically, but this will require some changes in all of the modules, e.g. we will have to add single entry point for all of the modules.
We will also need to change the way html templates are imported, right now it’s just a string in the templateUrl, it will need to use import/require or we can try to use https://www.npmjs.com/package/angularjs-template-loader instead, to make the change automatically.
If you have any questions, please let me know.