From RequireJS to webpack
Jamund Ferguson offers an overview of Paypal's transition from AMD to CommonJS, a very beneficial move. Moving from RequireJS to webpack meant Paypal could use any module in npm on its frontend and has made it easier to explore new technologies like Flux and React. Jamund summarizes Paypal's experiences to demonstrate how you too can move to webpack with ease.
Talk Title | From RequireJS to webpack |
Speakers | Jamund Ferguson (PayPal) |
Conference | Fluent |
Conf Tag | The Web Platform in Practice |
Location | San Francisco, California |
Date | March 8-10, 2016 |
URL | Talk Page |
Slides | Talk Slides |
Video | |
Jamund Ferguson offers an overview of Paypal’s transition from AMD to CommonJS, a very beneficial move. Six months ago, Jamund’s team at PayPal wanted to start adopting ES6, React, and Flux. Unfortunately, integrating these modules into the project required having access to npm modules, and the legacy build system is based on RequireJS, which made it inflexible. All of this made adopting these new technologies difficult. Webpack seemed to be the way out, but there were several challenges, including not having awesome docs, the existing AMD modules, RequireJS shim configuration, and reliance on lazy-loading modules. Despite challenges with the documentation, moving from AMD to the CommonJS format has brought huge wins for the team at PayPal. Webpack loaders are extremely powerful and well supported, and ES6 support is a breeze. Moving from RequireJS to webpack meant Paypal could use any module in npm on its frontend and has made it easier to explore new technologies like Flux and React. Jamund summarizes Paypal’s experiences to demonstrate how you too can move to webpack with ease.