Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuywap-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
陈峰
2018-07-27 10:35:36 +0800
Commit
2c4e29b34331c11cfb9d01ce5bd489b563f7fdf2
2 parents
e408d72f
f3be5fbf
Merge branch 'gray' into 'master'
Gray See merge request
!1493
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
public/build/webpack.sw.config.js
public/js/pwa/sw.js
public/static/sw.js
public/build/webpack.sw.config.js
View file @
2c4e29b
...
...
@@ -13,7 +13,7 @@ module.exports = {
target
:
'webworker'
,
module
:
{
rules
:
[{
test
:
/
\.
(
js|mjs
)
$/
,
test
:
/
\.
js
$/
,
include
:
[
path
.
join
(
__dirname
,
'../../node_modules/workbox-sw'
),
path
.
join
(
__dirname
,
'../js'
)],
use
:
'babel-loader'
}]
...
...
public/js/pwa/sw.js
View file @
2c4e29b
...
...
@@ -69,7 +69,7 @@ const precacheFile = [{
};
})).
concat
(
config
.
precachePage
.
map
(
page
=>
{
return
{
url
:
page
url
:
page
+
'?t='
+
qs
.
t
};
})).
concat
(
config
.
precacheCdnStaticFile
.
map
(
file
=>
{
return
{
...
...
@@ -116,7 +116,7 @@ workboxSW.router.registerRoute(args => {
}
// navigate 请求失败后,返回网络异常页面
return
caches
.
match
(
'offline.html
'
);
return
caches
.
match
(
'offline.html
?t='
+
qs
.
t
);
});
});
...
...
public/static/sw.js
View file @
2c4e29b
This diff could not be displayed because it is too large.
Please
register
or
login
to post a comment