Making small modules actually work with webpack and npm
summary
Claim: webpack plus npm can make tiny front-end modules truly modular by increasing cohesion and reducing coupling. Concrete tools and steps: use Babel loader (JSX) and CSS loader + style loader and url loader for images, enable local scope CSS for per-component classes, configure include/exclude for loaders, publish-dev with npm link, set library target (UMD) and externals (omit React), and use resolve.fallback or remove duplicate React to avoid two copies.
AI-written summary · about
chapters (9)
- 0:00Start
- 6:13COHESION
- 6:43COUPLING
- 8:07WHAT'S THE PROBLEM?
- 12:01LOADERS FOR TRANSPILING
- 13:09LOADERS VS. TRANSFORMS
- 16:38LOADERS FOR CSS
- 19:23LOADERS FOR IMAGES
- 23:45RESOURCES
related talks
28mWebpack for a better development workflow
19mModule Frontiers
41mOnce you go webpack you never go back
12mWriting a Webmodule
36mUnbundling the JavaScript module bundler
40mBuild Your Own webpack (Live Coding an Ultra-Simplified Example of a Modern Module Bundler in JavaScript)
26mA tale of two front-end development environments: or how bend npm3 to your will
17mBundling your Front-End with webpack
