mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-18 19:23:56 +00:00
Add PWA support
This commit is contained in:
4203
page/package-lock.json
generated
4203
page/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "emulator-ui",
|
||||
"name": "sogen",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"version": "1.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
@@ -60,6 +60,7 @@
|
||||
"prettier": "3.6.2",
|
||||
"typescript": "~5.8.3",
|
||||
"typescript-eslint": "^8.41.0",
|
||||
"vite": "^7.1.4"
|
||||
"vite": "^7.1.4",
|
||||
"vite-plugin-pwa": "^1.0.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,26 @@
|
||||
import path from "path";
|
||||
import tailwindcss from "@tailwindcss/vite";
|
||||
import { defineConfig } from "vite";
|
||||
import { VitePWA } from "vite-plugin-pwa";
|
||||
import react from "@vitejs/plugin-react";
|
||||
|
||||
const mb = 1024 ** 2;
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react(), tailwindcss()],
|
||||
plugins: [
|
||||
react(),
|
||||
tailwindcss(),
|
||||
VitePWA({
|
||||
registerType: "autoUpdate",
|
||||
manifest: {
|
||||
theme_color: "#0279E8",
|
||||
},
|
||||
workbox: {
|
||||
maximumFileSizeToCacheInBytes: 100 * mb,
|
||||
},
|
||||
}),
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": path.resolve(__dirname, "./src"),
|
||||
|
||||
Reference in New Issue
Block a user