mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
PWA: Disable service worker on shared domains #425
This commit is contained in:
@@ -56,7 +56,7 @@ import VueInfiniteScroll from "vue-infinite-scroll";
|
||||
import Hls from "hls.js";
|
||||
import { $gettext, Mount } from "common/vm";
|
||||
import * as options from "options/options";
|
||||
import offline from "@lcdp/offline-plugin/runtime";
|
||||
import * as offline from "@lcdp/offline-plugin/runtime";
|
||||
|
||||
// Initialize helpers
|
||||
const viewer = new Viewer();
|
||||
@@ -185,4 +185,6 @@ if (navigator.appVersion.indexOf("Chrome/") !== -1) {
|
||||
// Start application.
|
||||
Mount(Vue, PhotoPrism, router);
|
||||
|
||||
offline.install();
|
||||
if (config.baseUri === "") {
|
||||
offline.install();
|
||||
}
|
||||
|
||||
@@ -76,7 +76,14 @@ const config = {
|
||||
}),
|
||||
new webpack.ProgressPlugin(),
|
||||
new VueLoaderPlugin(),
|
||||
new OfflinePlugin(),
|
||||
new OfflinePlugin({
|
||||
relativePaths: false,
|
||||
publicPath: "/",
|
||||
excludes: ["**/*.txt", "**/share.*"],
|
||||
rewrites: function (asset) {
|
||||
return "/static/build/" + asset;
|
||||
},
|
||||
}),
|
||||
],
|
||||
performance: {
|
||||
hints: isDev ? false : "error",
|
||||
|
||||
Reference in New Issue
Block a user