From d5ece361aab72324e60bd2398e2f328ff1cdcc73 Mon Sep 17 00:00:00 2001 From: Daniel Ternyak Date: Mon, 8 Jan 2018 23:04:20 -0600 Subject: [PATCH] Revert "Implement `offline-plugin` for Service Workers / App Cache (#701)" (#760) This reverts commit ef506c54d6ee94ec5756c8d403ffdbe9b94881d4. --- common/index.tsx | 4 +--- package.json | 1 - webpack_config/webpack.prod.js | 13 +++++++++---- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/common/index.tsx b/common/index.tsx index 4616d967..17c51cdd 100644 --- a/common/index.tsx +++ b/common/index.tsx @@ -5,15 +5,13 @@ import 'sass/styles.scss'; import 'babel-polyfill'; import 'whatwg-fetch'; import React from 'react'; -import OfflineRuntime from 'offline-plugin/runtime'; import { render } from 'react-dom'; import Root from './Root'; import { configuredStore } from './store'; import consoleAdvertisement from './utils/consoleAdvertisement'; -OfflineRuntime.install(); - const appEl = document.getElementById('app'); + render(, appEl); if (module.hot) { diff --git a/package.json b/package.json index a0cd8336..46434f58 100644 --- a/package.json +++ b/package.json @@ -94,7 +94,6 @@ "node-sass": "4.7.2", "nodemon": "1.14.9", "null-loader": "0.1.1", - "offline-plugin": "4.9.0", "prettier": "1.9.2", "progress": "2.0.0", "react-hot-loader": "3.1.3", diff --git a/webpack_config/webpack.prod.js b/webpack_config/webpack.prod.js index 23cfd648..f13548cc 100644 --- a/webpack_config/webpack.prod.js +++ b/webpack_config/webpack.prod.js @@ -6,7 +6,7 @@ const webpack = require('webpack'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); const ProgressPlugin = require('webpack/lib/ProgressPlugin'); const BabelMinifyPlugin = require('babel-minify-webpack-plugin'); -const OfflinePlugin = require('offline-plugin'); +// const OfflinePlugin = require('offline-plugin') const base = require('./webpack.base'); const config = require('./config'); const rimraf = require('rimraf'); @@ -75,10 +75,15 @@ base.plugins.push( new webpack.optimize.CommonsChunkPlugin({ name: 'vendor', filename: 'vendor.[chunkhash:8].js' - }), - new OfflinePlugin({ - appShell: '/' }) + // For progressive web apps + // new OfflinePlugin({ + // relativePaths: false, + // AppCache: false, + // ServiceWorker: { + // events: true + // } + // }) ); // minimize webpack output