mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 10:58:20 -07:00
commit
b850b02a93
@ -44,6 +44,10 @@ self.addEventListener('notificationclick', function (event) {
|
|||||||
event.waitUntil(executeAction(action, data, serverId));
|
event.waitUntil(executeAction(action, data, serverId));
|
||||||
}, false);
|
}, false);
|
||||||
|
|
||||||
// this is needed by the webpack Workbox plugin
|
// Do not precache files in development so live reload works as expected
|
||||||
/* eslint-disable-next-line no-restricted-globals,no-undef */
|
/* eslint-disable-next-line no-undef -- NODE_ENV is replaced by webpack */
|
||||||
precacheAndRoute(self.__WB_MANIFEST);
|
if (process.env.NODE_ENV === 'production') {
|
||||||
|
// this is needed by the webpack Workbox plugin
|
||||||
|
/* eslint-disable-next-line no-restricted-globals,no-undef */
|
||||||
|
precacheAndRoute(self.__WB_MANIFEST);
|
||||||
|
}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
||||||
const CopyPlugin = require('copy-webpack-plugin');
|
const CopyPlugin = require('copy-webpack-plugin');
|
||||||
const WorkboxPlugin = require('workbox-webpack-plugin');
|
|
||||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||||
|
|
||||||
const Assets = [
|
const Assets = [
|
||||||
@ -72,10 +71,6 @@ module.exports = {
|
|||||||
to: path.resolve(__dirname, './dist/libraries/wasm-gen')
|
to: path.resolve(__dirname, './dist/libraries/wasm-gen')
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
}),
|
|
||||||
new WorkboxPlugin.InjectManifest({
|
|
||||||
swSrc: path.resolve(__dirname, 'src/serviceworker.js'),
|
|
||||||
swDest: 'serviceworker.js'
|
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
output: {
|
output: {
|
||||||
|
@ -3,6 +3,8 @@ const common = require('./webpack.common');
|
|||||||
const merge = require('webpack-merge');
|
const merge = require('webpack-merge');
|
||||||
|
|
||||||
module.exports = merge(common, {
|
module.exports = merge(common, {
|
||||||
|
// In order for live reload to work we must use "web" as the target not "browserlist"
|
||||||
|
target: 'web',
|
||||||
mode: 'development',
|
mode: 'development',
|
||||||
entry: './scripts/site.js',
|
entry: './scripts/site.js',
|
||||||
devtool: 'source-map',
|
devtool: 'source-map',
|
||||||
|
@ -1,7 +1,15 @@
|
|||||||
|
const path = require('path');
|
||||||
const common = require('./webpack.common');
|
const common = require('./webpack.common');
|
||||||
const merge = require('webpack-merge');
|
const merge = require('webpack-merge');
|
||||||
|
const WorkboxPlugin = require('workbox-webpack-plugin');
|
||||||
|
|
||||||
module.exports = merge(common, {
|
module.exports = merge(common, {
|
||||||
mode: 'production',
|
mode: 'production',
|
||||||
entry: './scripts/site.js'
|
entry: './scripts/site.js',
|
||||||
|
plugins: [
|
||||||
|
new WorkboxPlugin.InjectManifest({
|
||||||
|
swSrc: path.resolve(__dirname, 'src/serviceworker.js'),
|
||||||
|
swDest: 'serviceworker.js'
|
||||||
|
})
|
||||||
|
]
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user