1
1
mirror of https://github.com/go-gitea/gitea synced 2024-11-05 01:34:25 +00:00

Ensure serviceworker is created as /serviceworker.js (#11577) (#11582)

#11538 moved the serviceworker to webbox but unfortunately
created the serviceworker in public/js rather than public/

This PR fixes this, fixing multiple issues with broken js
as a result of that change.

Signed-off-by: Andrew Thornton art27@cantab.net
This commit is contained in:
zeripath 2020-05-23 21:41:33 +01:00 committed by GitHub
parent 3b1e114ede
commit ce958f45cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

1
.gitignore vendored
View File

@ -76,6 +76,7 @@ coverage.all
/node_modules
/yarn.lock
/public/js
/public/serviceworker.js
/public/css
/public/fonts
/public/fomantic

View File

@ -47,7 +47,7 @@ module.exports = {
filename: ({chunk}) => {
// serviceworker can only manage assets below it's script's directory so
// we have to put it in / instead of /js/
return chunk.id === 'serviceworker' ? '[name].js' : 'js/[name].js';
return chunk.name === 'serviceworker' ? '[name].js' : 'js/[name].js';
},
chunkFilename: 'js/[name].js',
},