3 ms·
Yes. The official Webpack docs [0] have been revamped, and are now pretty good. The "Webpack Tutorials" section of my links list [1] points to many more usefu
by acemarke 9y ago
Yes. The official Webpack docs [0] have been revamped, and are now pretty good. The "Webpack Tutorials" section of my links list [1] points to many more useful articles. I'd specifically suggest the "Webpack from First Principles" video [2] and the "Webpack: It's Not Magic" slides [3]
Also, Sean Larkin, one of Webpack's maintainers, has put together an online course site called "Webpack Academy" [4]. I believe the intro "Webpack Core Concepts" course is free.
[0] https://webpack.js.org/ https://webpack.js.org/
[1] https://www.youtube.com/watch?v=WQue1AN93YU https://www.youtube.com/watch?v=WQue1AN93YU
[2] https://www.youtube.com/watch?v=WQue1AN93YU https://www.youtube.com/watch?v=WQue1AN93YU
[3] https://naomiajacobs.github.io/WebpackTalk/ https://naomiajacobs.github.io/WebpackTalk/
[4] https://webpack.academy/ https://webpack.academy/
A short explanation is: you tell Webpack which file is the "entry point" to your application. It then recursively traces all the imports from there, creates a dependency tree, and bundles all those individual files into a single output bundle. You can also configure it to transform files along the way, allowing you to compile newer JS syntax into older syntax with Babel, import images and styles into your JS bundle, and much more. It also allows you to set up code splitting so that common code shared between different bundles is extracted into a separate bundle file, and parts of your app can be dynamically loaded after the initial app starts up.