-
-
Notifications
You must be signed in to change notification settings - Fork 27k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PWA-ification, via SWPrecacheWebpackPlugin + manifest.json #1728
Changes from 1 commit
8289386
75088ab
bfed215
2835105
2dc418b
21d14bb
a681e91
a9fb906
1cdb4cd
4e3ede4
86d590d
0640a20
cb40bd7
6aa8fe8
444f0ca
6a880f8
5ea92ae
f1b0f1d
074fc7e
804e858
f9b303a
502cbdf
9ea16b7
f8f3e20
27424ce
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,10 +15,10 @@ var HtmlWebpackPlugin = require('html-webpack-plugin'); | |
var ExtractTextPlugin = require('extract-text-webpack-plugin'); | ||
var ManifestPlugin = require('webpack-manifest-plugin'); | ||
var InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin'); | ||
var SWPrecacheWebpackPlugin = require('sw-precache-webpack-plugin'); | ||
var url = require('url'); | ||
var paths = require('./paths'); | ||
var getClientEnvironment = require('./env'); | ||
var SWPrecacheWebpackPlugin = require('sw-precache-webpack-plugin'); | ||
|
||
// @remove-on-eject-begin | ||
// `path` is not used after eject - see https://github.com/facebookincubator/create-react-app/issues/1174 | ||
|
@@ -278,6 +278,7 @@ module.exports = { | |
new SWPrecacheWebpackPlugin({ | ||
dontCacheBustUrlsMatching: /\.\w{8}\./, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't believe it's immediately apparent what this is doing, we should probably add a comment explaining we're trying to match any files with a hash (as generated by webpack). This configuration is handed to the user when they eject, so anything to help them understand what's going on better. 😄 |
||
filename: 'service-worker.js', | ||
minify: true, | ||
navigateFallback: publicUrl + '/index.html', | ||
staticFileGlobsIgnorePatterns: [/\.map$/, /asset-manifest\.json$/] | ||
}) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A brief comment explaining the purpose of this plugin would be nice.
e.g.