Unverified Commit 46d8462c authored by 陈帅's avatar 陈帅 Committed by GitHub

rm pwa (#4090)

parent feebab81
...@@ -10,7 +10,7 @@ module.exports = { ...@@ -10,7 +10,7 @@ module.exports = {
disableLocal: false, disableLocal: false,
}, },
title: 'Ant Design Pro', title: 'Ant Design Pro',
pwa: true, pwa: false,
// Your custom iconfont Symbol script Url // Your custom iconfont Symbol script Url
// eg://at.alicdn.com/t/font_1039637_btcrd5co4w.js // eg://at.alicdn.com/t/font_1039637_btcrd5co4w.js
// 注意:如果需要图标多色,Iconfont 图标项目里要进行批量去色处理 // 注意:如果需要图标多色,Iconfont 图标项目里要进行批量去色处理
......
...@@ -3,8 +3,6 @@ import { notification, Button, message } from 'antd'; ...@@ -3,8 +3,6 @@ import { notification, Button, message } from 'antd';
import { formatMessage } from 'umi-plugin-react/locale'; import { formatMessage } from 'umi-plugin-react/locale';
import defaultSettings from './defaultSettings'; import defaultSettings from './defaultSettings';
window.React = React;
const { pwa } = defaultSettings; const { pwa } = defaultSettings;
// if pwa is true // if pwa is true
if (pwa) { if (pwa) {
...@@ -58,4 +56,9 @@ if (pwa) { ...@@ -58,4 +56,9 @@ if (pwa) {
onClose: async () => {}, onClose: async () => {},
}); });
}); });
} else if ('serviceWorker' in navigator) {
// eslint-disable-next-line compat/compat
navigator.serviceWorker.ready.then(registration => {
registration.unregister();
});
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment