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
50 lines
1.3 KiB
TypeScript
50 lines
1.3 KiB
TypeScript
import tailwindcss from '@tailwindcss/vite';
|
|
import { defineConfig } from 'vitest/config';
|
|
import { playwright } from '@vitest/browser-playwright';
|
|
import { sveltekit } from '@sveltejs/kit/vite';
|
|
import fs from 'fs';
|
|
|
|
export default defineConfig({
|
|
define: {
|
|
'process.env.NODE_ENV': process.env.NODE_ENV === 'production' ? '"production"' : '"development"'
|
|
},
|
|
server: {
|
|
watch: {
|
|
ignored: ['**/debug_page.txt', '**/.ssl/**', '**/docs/**', '**/secrets/**']
|
|
},
|
|
https: {
|
|
key: fs.readFileSync('./.ssl/localhost.key'),
|
|
cert: fs.readFileSync('./.ssl/localhost.crt')
|
|
}
|
|
},
|
|
plugins: [
|
|
tailwindcss(), sveltekit()],
|
|
test: {
|
|
expect: { requireAssertions: true },
|
|
projects: [
|
|
{
|
|
extends: './vite.config.ts',
|
|
test: {
|
|
name: 'client',
|
|
browser: {
|
|
enabled: true,
|
|
provider: playwright(),
|
|
instances: [{ browser: 'chromium', headless: true }]
|
|
},
|
|
include: ['src/**/*.svelte.{test,spec}.{js,ts}'],
|
|
exclude: ['src/lib/server/**']
|
|
}
|
|
},
|
|
{
|
|
extends: './vite.config.ts',
|
|
test: {
|
|
name: 'server',
|
|
environment: 'node',
|
|
include: ['src/**/*.{test,spec}.{js,ts}'],
|
|
exclude: ['src/**/*.svelte.{test,spec}.{js,ts}']
|
|
}
|
|
}
|
|
]
|
|
}
|
|
});
|