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,
|
inject: true,
|
||||||
favicon: resolve('favicon.ico'),
|
favicon: resolve('favicon.ico'),
|
||||||
title: 'vue-element-admin',
|
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'),
|
from: path.resolve(__dirname, '../manifest.json'),
|
||||||
to: config.build.assetsSubDirectory
|
to: config.build.assetsSubDirectory
|
||||||
|
},
|
||||||
|
{
|
||||||
|
from: path.resolve(__dirname, '../logo.png'),
|
||||||
|
to: config.build.assetsSubDirectory
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
]
|
]
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
<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="renderer" content="webkit">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||||
<title>vue-element-admin</title>
|
<title>vue-element-admin</title>
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
</body>
|
</body>
|
||||||
<script>
|
<script>
|
||||||
if ('serviceWorker' in navigator) {
|
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
|
// Registration Success
|
||||||
console.log('[serviceWorker]: registration successful with scope: ', registration.scope)
|
console.log('[serviceWorker]: registration successful with scope: ', registration.scope)
|
||||||
}).catch(function(err) {
|
}).catch(function(err) {
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
"short_name": "VEAPWA",
|
"short_name": "VEAPWA",
|
||||||
"icons": [
|
"icons": [
|
||||||
{
|
{
|
||||||
"src": "../favicon.ico",
|
"src": "./logo.png",
|
||||||
"sizes": "128x128",
|
"sizes": "200x200",
|
||||||
"type": "image/png"
|
"type": "image/png"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
26
sw.js
26
sw.js
|
@ -4,21 +4,23 @@
|
||||||
const version = '2.0.0'
|
const version = '2.0.0'
|
||||||
const CACHE = version + '::PWAsite'
|
const CACHE = version + '::PWAsite'
|
||||||
const offlineURL = '/offline/'
|
const offlineURL = '/offline/'
|
||||||
const installFilesEssential = process.env.NODE_ENV === 'production' ? [
|
const installFilesEssential = [
|
||||||
'/',
|
|
||||||
'../static/manifest.json',
|
|
||||||
'../static/css/*',
|
|
||||||
'../static/img/*',
|
|
||||||
'../static/js/*',
|
|
||||||
'../static/fonts/*',
|
|
||||||
'../static/tinymce4.7.5/*',
|
|
||||||
'../static/js/*'
|
|
||||||
].concat(offlineURL) : [
|
|
||||||
'/',
|
'/',
|
||||||
|
'./static/manifest.json',
|
||||||
|
'./static/css/*',
|
||||||
|
'./static/img/*',
|
||||||
|
'./static/js/*',
|
||||||
|
'./static/fonts/*',
|
||||||
'./static/tinymce4.7.5/*',
|
'./static/tinymce4.7.5/*',
|
||||||
'./manifest.json',
|
'./static/js/*',
|
||||||
'./build/logo.png'
|
'./logo.png'
|
||||||
].concat(offlineURL)
|
].concat(offlineURL)
|
||||||
|
// const installFilesEssential = [
|
||||||
|
// '/',
|
||||||
|
// './static/tinymce4.7.5/*',
|
||||||
|
// './manifest.json',
|
||||||
|
// './build/logo.png'
|
||||||
|
// ].concat(offlineURL)
|
||||||
|
|
||||||
// install static assets
|
// install static assets
|
||||||
function installStaticFiles() {
|
function installStaticFiles() {
|
||||||
|
|
Loading…
Reference in New Issue