1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Move serviceworker precaching to production config

This commit is contained in:
Bill Thornton 2021-06-03 10:14:28 -04:00
parent 066690dd8b
commit 74940b601b
3 changed files with 16 additions and 9 deletions

View file

@ -1,7 +1,15 @@
const path = require('path');
const common = require('./webpack.common');
const merge = require('webpack-merge');
const WorkboxPlugin = require('workbox-webpack-plugin');
module.exports = merge(common, {
mode: 'production',
entry: './scripts/site.js'
entry: './scripts/site.js',
plugins: [
new WorkboxPlugin.InjectManifest({
swSrc: path.resolve(__dirname, 'src/serviceworker.js'),
swDest: 'serviceworker.js'
})
]
});