19.01.2017 CPHJS @penzington
New docs! webpack.js.org
Uses webpack@1
Built with webpack's production flag
Set process.env.NODE_ENV to "production"
Sets React to production mode
Small changes in config syntax
Understands ES6 modules
Introduces "tree shaking"
Warnings for large bundles
Don't import/require polyfills from code
Create a separate bundle for them in webpack config
Inject script tag for browsers that need it
Defer application init to after polyfills are loaded
Plugins allows to override default behaviour
Helps removing unwanted dynamic requires
Identify non-crucial parts of the functionality
Use import('...') syntax to async require modules
webpack automatically creates chunks for lazy loading
Gotcha: you need to teach babel to ignore import function
ES6-API-compatible leaner React replacement
Drops support for older syntax and older browser support
preact-compat makes it a drop-in replacement
wepack resolve aliases or "fake" React packages
Maciek Pekala
@penzington