update
This commit is contained in:
parent
41ba52032d
commit
1583b6a5ce
BIN
build/logo.png
BIN
build/logo.png
Binary file not shown.
Before Width: | Height: | Size: 6.7 KiB |
|
@ -56,7 +56,8 @@ const devWebpackConfig = merge(baseWebpackConfig, {
|
|||
inject: true,
|
||||
favicon: resolve('favicon.ico'),
|
||||
title: 'vue-element-admin',
|
||||
path: config.dev.assetsPublicPath + config.dev.assetsSubDirectory
|
||||
path: config.dev.assetsPublicPath + config.dev.assetsSubDirectory,
|
||||
pwaPath: config.dev.assetsPublicPath
|
||||
}),
|
||||
]
|
||||
})
|
||||
|
|
|
@ -152,6 +152,10 @@ const webpackConfig = merge(baseWebpackConfig, {
|
|||
{
|
||||
from: path.resolve(__dirname, '../manifest.json'),
|
||||
to: config.build.assetsSubDirectory
|
||||
},
|
||||
{
|
||||
from: path.resolve(__dirname, '../logo.png'),
|
||||
to: config.build.assetsSubDirectory
|
||||
}
|
||||
])
|
||||
]
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<link rel="manifest" href="<%= htmlWebpackPlugin.options.path %>/manifest.json">
|
||||
<link rel="manifest" href="<%= htmlWebpackPlugin.options.pwaPath %>/manifest.json">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<title>vue-element-admin</title>
|
||||
|
@ -15,7 +15,7 @@
|
|||
</body>
|
||||
<script>
|
||||
if ('serviceWorker' in navigator) {
|
||||
navigator.serviceWorker.register('<%= htmlWebpackPlugin.options.path %>/sw.js').then(function(registration) {
|
||||
navigator.serviceWorker.register('<%= htmlWebpackPlugin.options.pwaPath %>/sw.js').then(function(registration) {
|
||||
// Registration Success
|
||||
console.log('[serviceWorker]: registration successful with scope: ', registration.scope)
|
||||
}).catch(function(err) {
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
"short_name": "VEAPWA",
|
||||
"icons": [
|
||||
{
|
||||
"src": "../favicon.ico",
|
||||
"sizes": "128x128",
|
||||
"src": "./logo.png",
|
||||
"sizes": "200x200",
|
||||
"type": "image/png"
|
||||
}
|
||||
],
|
||||
|
|
26
sw.js
26
sw.js
|
@ -4,21 +4,23 @@
|
|||
const version = '2.0.0'
|
||||
const CACHE = version + '::PWAsite'
|
||||
const offlineURL = '/offline/'
|
||||
const installFilesEssential = process.env.NODE_ENV === 'production' ? [
|
||||
'/',
|
||||
'../static/manifest.json',
|
||||
'../static/css/*',
|
||||
'../static/img/*',
|
||||
'../static/js/*',
|
||||
'../static/fonts/*',
|
||||
'../static/tinymce4.7.5/*',
|
||||
'../static/js/*'
|
||||
].concat(offlineURL) : [
|
||||
const installFilesEssential = [
|
||||
'/',
|
||||
'./static/manifest.json',
|
||||
'./static/css/*',
|
||||
'./static/img/*',
|
||||
'./static/js/*',
|
||||
'./static/fonts/*',
|
||||
'./static/tinymce4.7.5/*',
|
||||
'./manifest.json',
|
||||
'./build/logo.png'
|
||||
'./static/js/*',
|
||||
'./logo.png'
|
||||
].concat(offlineURL)
|
||||
// const installFilesEssential = [
|
||||
// '/',
|
||||
// './static/tinymce4.7.5/*',
|
||||
// './manifest.json',
|
||||
// './build/logo.png'
|
||||
// ].concat(offlineURL)
|
||||
|
||||
// install static assets
|
||||
function installStaticFiles() {
|
||||
|
|
Loading…
Reference in New Issue