The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Hashing with Webpack for long term caching

Hashing with Webpack for long term caching

3:46
Leveraging the browser cache is an important part of page load performance. A great way to utilize this cache is by versioning your resources. In this lesson, learn how to use Webpack’s hashing feature so you can take advantage of long term caching of your assets.
Watch this lesson now
Avatar
egghead.io

Leveraging the browser cache is an important part of page load performance. A great way to utilize this cache is by versioning your resources. In this lesson, learn how to use Webpack’s hashing feature so you can take advantage of long term caching of your assets.

Avatar
Nathan

How do you configure this with hot reloading?

Avatar
Rolando

Hey, thanks again for the cool lesson, so what's the difference between [hash] and [chunkhash]??

In reply to egghead.io
Avatar
Kent C.

hash represents the unique hash for the entire build. chunkhash represents the unique hash for the individual chunk and is the only way to get caching of individual chunks.

In reply to Rolando
Avatar
Kent C.

The repo actually has hot module replacement enabled for development already.

In reply to Nathan
Avatar
Rolando

All right, I get now, thank you!

In reply to Kent C.
Avatar
Jernej

i want to use html-webpack-plugin with extract-text-webpack-plugin because I want to extract css, written in scss, to file but getting the following error (gist) - without latter plugin webpack isn't throwing any errors. What am I doing wrong?

Avatar
Kent C.

Hmmm, I'm not sure. Maybe you could ask on Stack Overflow.

In reply to Jernej
HEY, QUICK QUESTION!
Joel's Head
Why are we asking?