disabled pwa
This commit is contained in:
+6
-13
@@ -72,19 +72,12 @@ export const downloadFileAPI = async (fileID: string) => {
|
||||
|
||||
const url = `${getBackendURL()}/file-service/download/${fileID}`;
|
||||
|
||||
window.location.href = "https://www.google.com/";
|
||||
|
||||
// if (!isPwa()) {
|
||||
// const link = document.createElement("a");
|
||||
// document.body.appendChild(link);
|
||||
// link.href = url;
|
||||
// link.setAttribute("type", "hidden");
|
||||
// link.setAttribute("download", "true");
|
||||
// link.click();
|
||||
// } else {
|
||||
// alert("PWA");
|
||||
// window.open(url);
|
||||
// }
|
||||
const link = document.createElement("a");
|
||||
document.body.appendChild(link);
|
||||
link.href = url;
|
||||
link.setAttribute("type", "hidden");
|
||||
link.setAttribute("download", "true");
|
||||
link.click();
|
||||
};
|
||||
|
||||
export const getVideoTokenAPI = async () => {
|
||||
|
||||
+8
-7
@@ -1,7 +1,6 @@
|
||||
import { defineConfig, loadEnv } from "vite";
|
||||
import react from "@vitejs/plugin-react";
|
||||
import { visualizer } from "rollup-plugin-visualizer";
|
||||
import { VitePWA } from "vite-plugin-pwa";
|
||||
|
||||
export default defineConfig(({ mode }) => {
|
||||
const env = loadEnv(mode, "./src/config/");
|
||||
@@ -14,12 +13,14 @@ export default defineConfig(({ mode }) => {
|
||||
plugins: [
|
||||
react(),
|
||||
visualizer(),
|
||||
VitePWA({
|
||||
registerType: "autoUpdate",
|
||||
workbox: {
|
||||
navigateFallbackDenylist: [/^\/file-service\/download\//],
|
||||
},
|
||||
}),
|
||||
// Perhaps will be used in the future, currently lots of issues
|
||||
// With downloading files on safari iOS PWA (who would have guessed)
|
||||
// VitePWA({
|
||||
// registerType: "autoUpdate",
|
||||
// workbox: {
|
||||
// navigateFallbackDenylist: [/^\/file-service\/download\//],
|
||||
// },
|
||||
// }),
|
||||
],
|
||||
build: {
|
||||
outDir: "dist-frontend",
|
||||
|
||||
Reference in New Issue
Block a user