-
Notifications
You must be signed in to change notification settings - Fork 2
/
vite.config.js
86 lines (85 loc) · 2.4 KB
/
vite.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
import { fileURLToPath, URL } from "node:url";
import { defineConfig } from "vite";
import { VitePWA } from "vite-plugin-pwa";
import basicSsl from "@vitejs/plugin-basic-ssl";
import laravel, { refreshPaths } from "laravel-vite-plugin";
// https://vite.dev/config/
export default defineConfig({
server: {
host: "0.0.0.0",
port: 5173,
hmr: { host: "localhost" },
https: {},
watch: {
ignored: ["**/storage/**"],
},
},
resolve: {
alias: {
"@": fileURLToPath(new URL("./", import.meta.url)),
"~": fileURLToPath(new URL("./node_modules", import.meta.url)),
"!": fileURLToPath(new URL("./vendor", import.meta.url)),
},
},
plugins: [
laravel({
input: ["resources/css/app.css", "resources/js/app.js"],
refresh: [...refreshPaths, "resources/**", "src/**"],
}),
VitePWA({
buildBase: "/build/",
scope: "/",
registerType: "autoUpdate",
injectRegister: "script-defer",
workbox: {
cleanupOutdatedCaches: true,
directoryIndex: null,
globDirectory: "/app/public/build",
globPatterns: ["**/*.{js,css,html,svg,jpg,png,webp,ico,txt,woff,woff2}"],
maximumFileSizeToCacheInBytes: 4194304,
navigateFallback: null,
navigateFallbackDenylist: [/\/[api,livewire,live,vod]+\/.*/],
},
manifest: {
name: "Hub",
short_name: "Hub",
description: "A video on demand (VOD) media distribution system.",
categories: ["videos", "streaming", "vod"],
theme_color: "#030712",
background_color: "#030712",
display_override: ["standalone", "minimal-ui"],
display: "standalone",
orientation: "natural",
id: "/",
scope: "/",
start_url: "/",
icons: [
{
src: "/storage/images/android-chrome-192x192.png",
sizes: "192x192",
type: "image/png",
},
{
src: "/storage/images/android-chrome-512x512.png",
sizes: "512x512",
type: "image/png",
purpose: "any maskable",
},
],
},
}),
],
build: {
chunkSizeWarningLimit: 1024,
rollupOptions: {
output: {
manualChunks: {
utils: ["axios"],
ws: ["pusher-js", "laravel-echo"],
player: ["shaka-player"],
pwa: ["virtual:pwa-register"],
},
},
},
},
});