Skip to content

Commit b836037

Browse files
committed
add offline-plugin
1 parent 594d77b commit b836037

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"eslint-plugin-import": "1.12.0",
1818
"eslint-plugin-jsx-a11y": "2.2.2",
1919
"eslint-plugin-react": "6.3.0",
20-
"lerna": "2.0.0-beta.30"
20+
"lerna": "2.0.0-beta.30",
21+
"offline-plugin": "^3.4.2"
2122
}
2223
}

packages/react-scripts/config/webpack.config.prod.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ var HtmlWebpackPlugin = require('html-webpack-plugin');
1616
var ExtractTextPlugin = require('extract-text-webpack-plugin');
1717
var ManifestPlugin = require('webpack-manifest-plugin');
1818
var InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
19+
var OfflinePlugin = require('offline-plugin');
1920
var url = require('url');
2021
var paths = require('./paths');
2122
var getClientEnvironment = require('./env');
@@ -259,7 +260,8 @@ module.exports = {
259260
// having to parse `index.html`.
260261
new ManifestPlugin({
261262
fileName: 'asset-manifest.json'
262-
})
263+
}),
264+
new OfflinePlugin()
263265
],
264266
// Some libraries import Node modules but don't use them in the browser.
265267
// Tell Webpack to provide empty mocks for them so importing them works.

0 commit comments

Comments
 (0)