SurviveJS - Webpack
SurviveJS - Webpack
$19.99
Minimum price
$19.99
Suggested price
SurviveJS - Webpack

Last updated on 2018-05-06

About the Book

"SurviveJS - Webpack" has been built around a tutorial during which you develop a complex configuration while covering different facets of webpack. The 45 short chapters and seven appendices work as a reference you can use while developing your web applications. Also available as a paperback.

Even though the book has been designed around webpack, many of the techniques covered go beyond it. You will learn to improve the quality of your code while becoming aware of optimization techniques that help you to deliver more performant web applications.

The book was developed in collaboration with the webpack community, and its structure has evolved accordingly. A third of royalties go to Tobias Koppers, the author of the tool. The writer is a core developer of webpack so by purchasing this book you will support the effort in multiple ways.

The content has been split as below:

  • Foreword by Tobias Koppers, the author of webpack
  • Preface by Juho Vepsäläinen, the author of the book and a core developer of webpack
  • What is Webpack? - Learn what makes webpack tick
  • Developing - Set up a development environment on top of webpack
  • Styling - Load and manage styles while learning about topics like autoprefixing and eliminating unused CSS
  • Loading Assets - Load different asset types and process them
  • Building - Write initial build with webpack and learn techniques like bundle and code splitting
  • Optimizing - Learn to optimize the build results by minifying, tree shaking, and other techniques
  • Output - Understand webpack's output formats
  • Techniques - Learn specific techniques related to topics such as testing and consuming packages
  • Extending - Extend webpack with loaders and plugins
  • Conclusion - Recap core techniques
  • Appendices - Learn how webpack compares with other tools, how to set up Hot Module Replacement, troubleshoot webpack
The Leanpub edition comes with a two page PDF cheatsheet that covers the main ideas of webpack in a compact format. It's also available in poster form (single A3, either portrait or landscape). You also get a ~20 page QA PDF where Tobias Koppers, the creator of the tool answers to tough questions.

About the Authors

Juho Vepsäläinen
Juho Vepsäläinen

Juho Vepsäläinen is behind the SurviveJS effort. In addition to being a core developer of webpack, I have been active in the open source scene since the early 2000s. Blue Arrow Awards winner.

Jesús Rodríguez Rodríguez
Jesús Rodríguez Rodríguez

Jesús Rodríguez Rodríguez is a frontend developer who dedicates his time to moderate the official Angular.js IRC channel and he also gives support there.

He spent some time collaborating with organization like AngularUI and he also write in his blog (http://www.angular-tips.com) all about angular.

He also likes to edit / review books, that also includes writing his own books.

Packages

The Book

The book in pdf, epub, mobi. The source code is available at https://github.com/survivejs/webpack.

Includes:

  • extras
    Cheatsheet

    Cheatsheet covering webpack's core ideas.

  • extras
    QA with Tobias Koppers, the creator of the tool

    This brief document (30+) pages contains QA (questions/answers) with Tobias Koppers, the creator of the tool. Read it to gain more insight into webpack and where it's going.

  • extras
    Posters

    Posters covering webpack's core ideas. Print in A3 for the best result.

  • English

  • PDF

  • EPUB

  • MOBI

  • APP

$19.99
Minimum price
$19.99
Suggested price
One for a friend too

Get a copy for a friend as well. Includes two copies.

Includes:

  • extras
    Cheatsheet

    Cheatsheet covering webpack's core ideas.

  • extras
    QA with Tobias Koppers, the creator of the tool

    This brief document (30+) pages contains QA (questions/answers) with Tobias Koppers, the creator of the tool. Read it to gain more insight into webpack and where it's going.

  • extras
    Posters

    Posters covering webpack's core ideas. Print in A3 for the best result.

  • English

  • PDF

  • EPUB

  • MOBI

  • APP

$33.99
Minimum price
$33.99
Suggested price
One for the team

Get copies for your team mates. Or friends. I don't discriminate. Includes four copies.

Includes:

  • extras
    Cheatsheet

    Cheatsheet covering webpack's core ideas.

  • extras
    QA with Tobias Koppers, the creator of the tool

    This brief document (30+) pages contains QA (questions/answers) with Tobias Koppers, the creator of the tool. Read it to gain more insight into webpack and where it's going.

  • extras
    Posters

    Posters covering webpack's core ideas. Print in A3 for the best result.

  • English

  • PDF

  • EPUB

  • MOBI

  • APP

$63.99
Minimum price
$63.99
Suggested price

Bundles that include this book

SurviveJS - React
SurviveJS - Webpack
2 Books
$35.98
Suggested Price
$28.99
Bundle Price
SurviveJS - React
SurviveJS - Webpack
SurviveJS - Maintenance
3 Books
$50.97
Suggested Price
$34.99
Bundle Price

Reader Testimonials

Gavin Doughtie (Senior Software Engineer, Google)
Gavin Doughtie (Senior Software Engineer, Google)

Before I worked through the SurviveJS Webpack book, my own Webpack config, cobbled together from random code on the Internet, was a mystery to me. Afterwards, I have route-splitting and parallel-loading superpowers.

Clément Paris (Front-End Engineer)
Clément Paris (Front-End Engineer)

After weeks failing at configuring webpack, I stumbled upon SurviveJS book while looking for yet another tutorial. Since that day, it has been my go-to resource for every single webpack question I ever had.

Andrea Chiumenti (CEO, Red Software Systems)
Andrea Chiumenti (CEO, Red Software Systems)

Brilliant! A must have if you want to to learn Webpack but also if need an updated reference guide. I always use it as a reference guide when I develop.

Neeraj Singh (Founder of BigBinary)
Neeraj Singh (Founder of BigBinary)

Practical tips on Webpack

Webpack is powerful but configuring it can be painful. Same goes with React. There are so many ways of configuring React with asset compilation, minification etc that it is easy to get lost. This book provides practical tips on how to proceed.

Stefan Frede (Developer)
Stefan Frede (Developer)

This book is an invaluable resource if you start working with Webpack!

Aaron Harris (Software Engineer)
Aaron Harris (Software Engineer)

This guide was a great starter in taming the Wild West of ESNext-era JavaScript development. It's beauty comes from its commitment to not skipping the fundamentals in favor of a fast demo, but making sure you're understanding what you're doing as you bootstrap your next JavaScript-based UI project.

Julien Castelain (Software Engineer, Liferay)
Julien Castelain (Software Engineer, Liferay)

This guide is a great way to get started with webpack or improve your existing skills

After a detailed introduction, you'll start working on a webpack project that provides all you need to push your app to production. Highly recommended.

Table of Contents

  •  
    • Foreword
    • Preface
    • Introduction
      • What Is Webpack
      • What Will You Learn
      • How Is The Book Organized
      • Who Is The Book For
      • Book Versioning
      • Getting Support
      • Additional Material
      • Acknowledgments
    • What is Webpack
      • Webpack Relies on Modules
      • Webpack’s Execution Process
      • Webpack Is Configuration Driven
      • Asset Hashing
      • Hot Module Replacement
      • Code Splitting
      • Conclusion
  • I Developing
    • 1. Getting Started
      • 1.1 Setting Up the Project
      • 1.2 Installing Webpack
      • 1.3 Executing Webpack
      • 1.4 Setting Up Assets
      • 1.5 Configuring html-webpack-plugin
      • 1.6 Examining the Output
      • 1.7 Adding a Build Shortcut
      • 1.8 HtmlWebpackPlugin Extensions
      • 1.9 Conclusion
    • 2. webpack-dev-server
      • 2.1 Webpack watch Mode and webpack-dev-server
      • 2.2 Emitting Files from WDS
      • 2.3 Getting Started with WDS
      • 2.4 Attaching WDS to the Project
      • 2.5 Configuring WDS Through Webpack Configuration
      • 2.6 Enabling Error Overlay
      • 2.7 Enabling Hot Module Replacement
      • 2.8 Accessing the Development Server from Network
      • 2.9 Making It Faster to Develop Configuration
      • 2.10 Polling Instead of Watching Files
      • 2.11 Alternate Ways to Use webpack-dev-server
      • 2.12 Other Features of webpack-dev-server
      • 2.13 Development Plugins
      • 2.14 Output Plugins
      • 2.15 Conclusion
    • 3. Composing Configuration
      • 3.1 Possible Ways to Manage Configuration
      • 3.2 Composing Configuration by Merging
      • 3.3 Setting Up webpack-merge
      • 3.4 Benefits of Composing Configuration
      • 3.5 Configuration Layouts
      • 3.6 Conclusion
  • II Styling
    • 4. Loading Styles
      • 4.1 Loading CSS
      • 4.2 Setting Up the Initial CSS
      • 4.3 Loading Less
      • 4.4 Loading Sass
      • 4.5 Loading Stylus and Yeticss
      • 4.6 PostCSS
      • 4.7 Understanding Lookups
      • 4.8 Enabling Source Maps
      • 4.9 Converting CSS to Strings
      • 4.10 Using Bootstrap
      • 4.11 Conclusion
    • 5. Separating CSS
      • 5.1 Setting Up MiniCssExtractPlugin
      • 5.2 Managing Styles Outside of JavaScript
      • 5.3 Conclusion
    • 6. Eliminating Unused CSS
      • 6.1 Setting Up Pure.css
      • 6.2 Enabling PurifyCSS
      • 6.3 Conclusion
    • 7. Autoprefixing
      • 7.1 Setting Up Autoprefixing
      • 7.2 Conclusion
  • III Loading Assets
    • 8. Loader Definitions
      • 8.1 Anatomy of a Loader
      • 8.2 Loader Evaluation Order
      • 8.3 Passing Parameters to a Loader
      • 8.4 Branching at use Using a Function
      • 8.5 Inline Definitions
      • 8.6 Alternate Ways to Match Files
      • 8.7 Loading Based on resourceQuery
      • 8.8 Loading Based on issuer
      • 8.9 Understanding Loader Behavior
      • 8.10 Conclusion
    • 9. Loading Images
      • 9.1 Setting Up url-loader
      • 9.2 Setting Up file-loader
      • 9.3 Integrating Images to the Project
      • 9.4 Loading SVGs
      • 9.5 Optimizing Images
      • 9.6 Utilizing srcset
      • 9.7 Loading Images Dynamically
      • 9.8 Loading Sprites
      • 9.9 Using Placeholders
      • 9.10 Getting Image Dimensions
      • 9.11 Referencing to Images
      • 9.12 Images and css-loader Source Map Gotcha
      • 9.13 Conclusion
    • 10. Loading Fonts
      • 10.1 Choosing One Format
      • 10.2 Supporting Multiple Formats
      • 10.3 Manipulating file-loader Output Path and publicPath
      • 10.4 Generating Font Files Based on SVGs
      • 10.5 Using Google Fonts
      • 10.6 Using Icon Fonts
      • 10.7 Conclusion
    • 11. Loading JavaScript
      • 11.1 Using Babel with Webpack Configuration
      • 11.2 Polyfilling Features
      • 11.3 Babel Tips
      • 11.4 Babel Plugins
      • 11.5 Enabling Presets and Plugins per Environment
      • 11.6 Setting Up TypeScript
      • 11.7 Setting Up Flow
      • 11.8 Conclusion
  • IV Building
    • 12. Source Maps
      • 12.1 Inline Source Maps and Separate Source Maps
      • 12.2 Enabling Source Maps
      • 12.3 Source Map Types Supported by Webpack
      • 12.4 Inline Source Map Types
      • 12.5 Separate Source Map Types
      • 12.6 Other Source Map Options
      • 12.7 SourceMapDevToolPlugin and EvalSourceMapDevToolPlugin
      • 12.8 Changing Source Map Prefix
      • 12.9 Using Dependency Source Maps
      • 12.10 Source Maps for Styling
      • 12.11 Conclusion
    • 13. Bundle Splitting
      • 13.1 The Idea of Bundle Splitting
      • 13.2 Adding Something to Split
      • 13.3 Setting Up a vendor Bundle
      • 13.4 Controlling Bundle Splitting
      • 13.5 Splitting and Merging Chunks
      • 13.6 Chunk Types in Webpack
      • 13.7 Conclusion
    • 14. Code Splitting
      • 14.1 Code Splitting Formats
      • 14.2 Setting Up Code Splitting
      • 14.3 Code Splitting in React
      • 14.4 Disabling Code Splitting
      • 14.5 Conclusion
    • 15. Tidying Up
      • 15.1 Cleaning the Build Directory
      • 15.2 Attaching a Revision to the Build
      • 15.3 Copying Files
      • 15.4 Conclusion
  • V Optimizing
    • 16. Minifying
      • 16.1 Minifying JavaScript
      • 16.2 Other Ways to Minify JavaScript
      • 16.3 Speeding Up JavaScript Execution
      • 16.4 Minifying HTML
      • 16.5 Minifying CSS
      • 16.6 Minifying Images
      • 16.7 Conclusion
    • 17. Tree Shaking
      • 17.1 Demonstrating Tree Shaking
      • 17.2 Tree Shaking on Package Level
      • 17.3 Conclusion
    • 18. Environment Variables
      • 18.1 The Basic Idea of DefinePlugin
      • 18.2 Setting process.env.NODE_ENV
      • 18.3 Replacing Free Variables Through Babel
      • 18.4 Choosing Which Module to Use
      • 18.5 Conclusion
    • 19. Adding Hashes to Filenames
      • 19.1 Placeholders
      • 19.2 Setting Up Hashing
      • 19.3 Conclusion
    • 20. Separating a Manifest
      • 20.1 Extracting a Manifest
      • 20.2 Using Records
      • 20.3 Conclusion
    • 21. Build Analysis
      • 21.1 Configuring Webpack
      • 21.2 Enabling a Performance Budget
      • 21.3 Available Analysis Tools
      • 21.4 Duplication Analysis
      • 21.5 Independent Tools
      • 21.6 Conclusion
    • 22. Performance
      • 22.1 Measuring Impact
      • 22.2 High-Level Optimizations
      • 22.3 Low-Level Optimizations
      • 22.4 Optimizing Rebundling Speed During Development
      • 22.5 Conclusion
  • VI Output
    • 23. Build Targets
      • 23.1 Web Targets
      • 23.2 Node Targets
      • 23.3 Desktop Targets
      • 23.4 Conclusion
    • 24. Multiple Pages
      • 24.1 Possible Approaches
      • 24.2 Generating Multiple Pages
      • 24.3 Generating Multiple Pages While Sharing Code
      • 24.4 Progressive Web Applications
      • 24.5 Conclusion
    • 25. Server Side Rendering
      • 25.1 Setting Up Babel with React
      • 25.2 Setting Up a React Demo
      • 25.3 Configuring Webpack
      • 25.4 Setting Up a Server
      • 25.5 Watching SSR Changes and Refreshing the Browser
      • 25.6 Open Questions
      • 25.7 Conclusion
  • VII Techniques
    • 26. Dynamic Loading
      • 26.1 Dynamic Loading with require.context
      • 26.2 Dynamic Paths with a Dynamic import
      • 26.3 Combining Multiple require.contexts
      • 26.4 Dealing with Dynamic Paths
      • 26.5 Conclusion
    • 27. Web Workers
      • 27.1 Setting Up Worker Loader
      • 27.2 Setting Up a Worker
      • 27.3 Setting Up a Host
      • 27.4 Conclusion
    • 28. Internationalization
      • 28.1 i18n with Webpack
      • 28.2 Setting Up a Project
      • 28.3 Setting Up I18nWebpackPlugin
      • 28.4 Conclusion
    • 29. Testing
      • 29.1 Mocha
      • 29.2 Karma and Mocha
      • 29.3 Jest
      • 29.4 AVA
      • 29.5 Mocking
      • 29.6 Removing Files From Tests
      • 29.7 Conclusion
    • 30. Deploying Applications
      • 30.1 Deploying with gh-pages
      • 30.2 Deploying to Other Environments
      • 30.3 Resolving output.publicPath Dynamically
      • 30.4 Conclusion
    • 31. Consuming Packages
      • 31.1 resolve.alias
      • 31.2 resolve.extensions
      • 31.3 resolve.modules
      • 31.4 resolve.plugins
      • 31.5 Consuming Packages Outside of Webpack
      • 31.6 Dealing with Globals
      • 31.7 Removing Unused Modules
      • 31.8 Managing Pre-built Dependencies
      • 31.9 Managing Symbolic Links
      • 31.10 Getting Insights on Packages
      • 31.11 Conclusion
  • VIII Extending
    • 32. Extending with Loaders
      • 32.1 Debugging Loaders with loader-runner
      • 32.2 Implementing an Asynchronous Loader
      • 32.3 Returning Only Output
      • 32.4 Writing Files
      • 32.5 Passing Options to Loaders
      • 32.6 Connecting Custom Loaders with Webpack
      • 32.7 Pitch Loaders
      • 32.8 Caching with Loaders
      • 32.9 Conclusion
    • 33. Extending with Plugins
      • 33.1 The Basic Flow of Webpack Plugins
      • 33.2 Setting Up a Development Environment
      • 33.3 Implementing a Basic Plugin
      • 33.4 Capturing Options
      • 33.5 Understanding Compiler and Compilation
      • 33.6 Writing Files Through Compilation
      • 33.7 Managing Warnings and Errors
      • 33.8 Plugins Can Have Plugins
      • 33.9 Plugins Can Run Compilers of Their Own
      • 33.10 Conclusion
  • Conclusion
    •  
      • General Checklist
      • Development Checklist
      • Production Checklist
      • Conclusion
  • Appendices
    • Comparison of Build Tools
      • Task Runners
      • Script Loaders
      • Bundlers
      • Other Options
      • Conclusion
    • Hot Module Replacement
      • Enabling HMR
      • Implementing the HMR Interface
      • Setting WDS Entry Points Manually
      • HMR and Dynamic Loading
      • Conclusion
    • CSS Modules
      • CSS Modules Through css-loader
      • Using CSS Modules with Third Party Libraries and CSS
      • Conclusion
    • Searching with React
      • Implementing Search with Code Splitting
      • Conclusion
    • Troubleshooting
      • ERROR in Entry module not found
      • ERROR … Module not found
      • Module parse failed
      • Loader Not Found
      • Module build failed: Unknown word
      • SyntaxError: Unexpected token
      • DeprecationWarning
      • Conclusion
    • Glossary
      • Introduction
      • Developing
      • Loading
      • Building
      • Optimizing
      • Output

The Leanpub 45-day 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Write and Publish on Leanpub

Authors, publishers and universities use Leanpub to publish amazing in-progress and completed books and courses, just like this one. You can use Leanpub to write, publish and sell your book or course as well! Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks. Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. It really is that easy.

Learn more about writing on Leanpub