diff --git a/webpack.common.js b/webpack.common.js index 8e72921419..5c4d283b26 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -110,7 +110,9 @@ const config = { }) ], output: { - filename: '[name].bundle.js', + filename: pathData => ( + pathData.chunk.name === 'serviceworker' ? '[name].js' : '[name].bundle.js' + ), chunkFilename: '[name].[contenthash].chunk.js', path: path.resolve(__dirname, 'dist'), publicPath: '' diff --git a/webpack.prod.js b/webpack.prod.js index 2b4bc5d7fa..8b2c9aad5e 100644 --- a/webpack.prod.js +++ b/webpack.prod.js @@ -3,5 +3,8 @@ const { merge } = require('webpack-merge'); module.exports = merge(common, { mode: 'production', - entry: { 'main.jellyfin': './index.jsx' } + entry: { + 'main.jellyfin': './index.jsx', + 'serviceworker': './serviceworker.js' + } });