-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
50 lines (47 loc) · 1.11 KB
/
vite.config.ts
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
import { defineConfig } from "vite";
import { svelte } from "@sveltejs/vite-plugin-svelte";
import { VitePWA, VitePWAOptions } from 'vite-plugin-pwa' // これを追加
const pwaOptions: Partial<VitePWAOptions> = {
strategies: 'generateSW' as 'generateSW', // デフォルトなので不要
manifest: {
name: 'PPPOST',
short_name: 'PPPOST',
description: 'Multi post for SNS',
icons: [
{
src: 'app.png',
sizes: '100x100',
type: 'image/png',
},
],
start_url: 'index.html',
display: 'standalone',
background_color: '#ECFFE6',
theme_color: '#399918',
lang: 'ja',
share_target: {
action: './index.html',
params: {
title: 'title',
text: 'text',
url: 'url'
}
}
},
// includeAssets: ['ui_icon/*.svg'],
// devOptions: {
// enabled: true,
// },
}
// https://vitejs.dev/config/
export default defineConfig({
base: "./",
plugins: [svelte(), VitePWA(pwaOptions)],
css: {
preprocessorOptions: {
scss: {
additionalData: '@use "src/variables.scss" as *;',
},
},
},
});