feat(pwa): remove SvelteKitPWA plugin dependencies
Story 2: Remove SvelteKitPWA Plugin Dependencies - Remove @vite-pwa/sveltekit from package.json dependencies - Remove SvelteKitPWA plugin import and configuration from vite.config.ts - Clean up plugin configuration including manifest, workbox, and devOptions - Build process now works without plugin (service worker migration needed next) Dependencies reduced by 309 packages Build fails on workbox imports as expected - ready for Story 3 Refs: docs/plans/MigrateToNativeSvelteKitPWA.md
This commit is contained in:
4710
package-lock.json
generated
4710
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -23,7 +23,6 @@
|
|||||||
"@sveltejs/vite-plugin-svelte": "^6.2.1",
|
"@sveltejs/vite-plugin-svelte": "^6.2.1",
|
||||||
"@tailwindcss/vite": "^4.1.17",
|
"@tailwindcss/vite": "^4.1.17",
|
||||||
"@types/node": "^22",
|
"@types/node": "^22",
|
||||||
"@vite-pwa/sveltekit": "^0.3.0",
|
|
||||||
"@vitest/browser-playwright": "^4.0.10",
|
"@vitest/browser-playwright": "^4.0.10",
|
||||||
"eslint": "^9.39.1",
|
"eslint": "^9.39.1",
|
||||||
"eslint-config-prettier": "^10.1.8",
|
"eslint-config-prettier": "^10.1.8",
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
"value": "SDRORLyWEsWWty2ZoVGdER",
|
"value": "SDRORLyWEsWWty2ZoVGdER",
|
||||||
"domain": ".instagram.com",
|
"domain": ".instagram.com",
|
||||||
"path": "/",
|
"path": "/",
|
||||||
"expires": 1800936907.11208,
|
"expires": 1800937709.288068,
|
||||||
"httpOnly": false,
|
"httpOnly": false,
|
||||||
"secure": true,
|
"secure": true,
|
||||||
"sameSite": "Lax"
|
"sameSite": "Lax"
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
"value": "59661903731",
|
"value": "59661903731",
|
||||||
"domain": ".instagram.com",
|
"domain": ".instagram.com",
|
||||||
"path": "/",
|
"path": "/",
|
||||||
"expires": 1774152907.11217,
|
"expires": 1774153709.288173,
|
||||||
"httpOnly": false,
|
"httpOnly": false,
|
||||||
"secure": true,
|
"secure": true,
|
||||||
"sameSite": "None"
|
"sameSite": "None"
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
"value": "1280x720",
|
"value": "1280x720",
|
||||||
"domain": ".instagram.com",
|
"domain": ".instagram.com",
|
||||||
"path": "/",
|
"path": "/",
|
||||||
"expires": 1766981708,
|
"expires": 1766982509,
|
||||||
"httpOnly": false,
|
"httpOnly": false,
|
||||||
"secure": true,
|
"secure": true,
|
||||||
"sameSite": "Lax"
|
"sameSite": "Lax"
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "rur",
|
"name": "rur",
|
||||||
"value": "\"CLN\\05459661903731\\0541797912907:01feab225fa86f00b6be5c6aad172798799c1d3bf81b1dcd57e6fc8313e49aa6b9899a74\"",
|
"value": "\"CLN\\05459661903731\\0541797913709:01fe9901d778068c1e12d177d918913a9e0ac541b803518c6f5cbdc54e966f512cdfd807\"",
|
||||||
"domain": ".instagram.com",
|
"domain": ".instagram.com",
|
||||||
"path": "/",
|
"path": "/",
|
||||||
"expires": -1,
|
"expires": -1,
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
"localStorage": [
|
"localStorage": [
|
||||||
{
|
{
|
||||||
"name": "chatd-deviceid",
|
"name": "chatd-deviceid",
|
||||||
"value": "959def05-6e66-4805-8316-d9fdd4cd4f95"
|
"value": "e55831d9-52f6-4b3b-a96a-cc3125af6b01"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "hb_timestamp",
|
"name": "hb_timestamp",
|
||||||
@@ -95,11 +95,11 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "IGSession",
|
"name": "IGSession",
|
||||||
"value": "kc8y0b:1766378707663"
|
"value": "kc8y0b:1766379509344"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "mutex_polaris_banzai",
|
"name": "mutex_polaris_banzai",
|
||||||
"value": "8ort9t:1766376779950"
|
"value": "yd2eoe:1766377710344"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "pixel_fire_ts",
|
"name": "pixel_fire_ts",
|
||||||
@@ -111,7 +111,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Session",
|
"name": "Session",
|
||||||
"value": "b8iamu:1766376942663"
|
"value": "nseh2f:1766377744344"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "has_interop_upgraded",
|
"name": "has_interop_upgraded",
|
||||||
@@ -119,7 +119,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "mutex_banzai",
|
"name": "mutex_banzai",
|
||||||
"value": "8ort9t:1766376779950"
|
"value": "yd2eoe:1766377710344"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "banzai:last_storage_flush",
|
"name": "banzai:last_storage_flush",
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import tailwindcss from '@tailwindcss/vite';
|
|||||||
import { defineConfig } from 'vitest/config';
|
import { defineConfig } from 'vitest/config';
|
||||||
import { playwright } from '@vitest/browser-playwright';
|
import { playwright } from '@vitest/browser-playwright';
|
||||||
import { sveltekit } from '@sveltejs/kit/vite';
|
import { sveltekit } from '@sveltejs/kit/vite';
|
||||||
import { SvelteKitPWA } from '@vite-pwa/sveltekit';
|
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
@@ -19,66 +18,7 @@ export default defineConfig({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
SvelteKitPWA({
|
tailwindcss(), sveltekit()],
|
||||||
srcDir: './src',
|
|
||||||
mode: process.env.NODE_ENV === 'production' ? 'production' : 'development',
|
|
||||||
strategies: 'injectManifest',
|
|
||||||
filename: 'service-worker.ts',
|
|
||||||
scope: '/',
|
|
||||||
base: '/',
|
|
||||||
selfDestroying: process.env.SELF_DESTROYING_SW === 'true',
|
|
||||||
// Disable automatic registration to prevent test environment issues
|
|
||||||
injectRegister: process.env.NODE_ENV === 'test' ? false : 'auto',
|
|
||||||
injectManifest: {
|
|
||||||
swSrc: 'src/service-worker.ts',
|
|
||||||
swDest: 'service-worker.js',
|
|
||||||
injectionPoint: 'self.__WB_MANIFEST',
|
|
||||||
// Additional build configuration for better reliability
|
|
||||||
globPatterns: ['**/*.{js,css,html,ico,png,svg,webp,woff,woff2}'],
|
|
||||||
maximumFileSizeToCacheInBytes: 4 * 1024 * 1024, // 4MB
|
|
||||||
},
|
|
||||||
manifest: {
|
|
||||||
short_name: 'InstaChef',
|
|
||||||
name: 'InstaChef Recipe Saver',
|
|
||||||
start_url: '/',
|
|
||||||
scope: '/',
|
|
||||||
display: 'standalone',
|
|
||||||
theme_color: "#ffffff",
|
|
||||||
background_color: "#ffffff",
|
|
||||||
icons: [
|
|
||||||
{ src: '/favicon.png', sizes: '192x192', type: 'image/png' },
|
|
||||||
{ src: '/favicon.png', sizes: '512x512', type: 'image/png' }
|
|
||||||
],
|
|
||||||
share_target: {
|
|
||||||
action: '/share',
|
|
||||||
method: 'GET',
|
|
||||||
enctype: 'application/x-www-form-urlencoded',
|
|
||||||
params: { title: 'title', text: 'text', url: 'url' }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
workbox: {
|
|
||||||
globPatterns: ['client/**/*.{js,css,ico,png,svg,webp,woff,woff2}'],
|
|
||||||
cleanupOutdatedCaches: true,
|
|
||||||
skipWaiting: false, // Let service worker control this
|
|
||||||
clientsClaim: false, // Let service worker control this
|
|
||||||
maximumFileSizeToCacheInBytes: 4 * 1024 * 1024, // 4MB
|
|
||||||
runtimeCaching: [
|
|
||||||
{
|
|
||||||
urlPattern: /^https:\/\/api\./,
|
|
||||||
handler: 'NetworkFirst',
|
|
||||||
options: {
|
|
||||||
cacheName: 'api-cache',
|
|
||||||
networkTimeoutSeconds: 10
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
devOptions: {
|
|
||||||
enabled: process.env.NODE_ENV !== 'test', // Disable in test environment
|
|
||||||
suppressWarnings: true,
|
|
||||||
navigateFallback: '/',
|
|
||||||
},
|
|
||||||
}),tailwindcss(), sveltekit()],
|
|
||||||
test: {
|
test: {
|
||||||
expect: { requireAssertions: true },
|
expect: { requireAssertions: true },
|
||||||
projects: [
|
projects: [
|
||||||
|
|||||||
Reference in New Issue
Block a user