Compare commits

...

2 commits

Author SHA1 Message Date
SevicheCC
b99e3bbce4
fix: pwa build error 2023-05-28 02:35:24 +08:00
SevicheCC
51001b4c9a
fix: http font 2023-05-28 01:38:05 +08:00
7 changed files with 933 additions and 951 deletions

1
.npmrc
View file

@ -1 +1,2 @@
engine-strict=true
strict-peer-dependencies=false

View file

@ -29,7 +29,7 @@ node_bundler = "esbuild"
X-Frame-Options = "SAMEORIGIN"
X-Content-Type-Options = "nosniff"
X-XSS-Protection = "1; mode=block"
Content-Security-Policy = "style-src 'self' http://fonts.cdnfonts.com/css/lato https://giscus.app/default.css; script-src 'self' 'unsafe-inline' https://*.seviche.cc https://giscus.app https://hexoverc.vercel.app/umami.js https://cdn.splitbee.io/sb.js https://plausiable.seviche.cc/js/script.js"
Content-Security-Policy = "script-src 'self' 'unsafe-inline' https://*.seviche.cc https://giscus.app https://hexoverc.vercel.app/umami.js https://cdn.splitbee.io/sb.js https://plausiable.seviche.cc/js/script.js"
Referrer-Policy = "strict-origin-when-cross-origin"
[[redirects]]
from = "/.well-known/webfinger"

View file

@ -36,19 +36,19 @@
"@sveltejs/adapter-netlify": "^2.0.7",
"@sveltejs/adapter-static": "^2.0.2",
"@sveltejs/adapter-vercel": "2.4.3",
"@sveltejs/kit": "^1.18.0",
"@sveltejs/kit": "^1.19.0",
"@tailwindcss/typography": "^0.5.9",
"@types/node": "^20.2.1",
"@types/node": "^20.2.5",
"@types/unist": "^2.0.6",
"@typescript-eslint/eslint-plugin": "^5.59.6",
"@typescript-eslint/parser": "^5.59.6",
"@typescript-eslint/eslint-plugin": "^5.59.7",
"@typescript-eslint/parser": "^5.59.7",
"@unocss/extractor-svelte": "^0.51.13",
"@vite-pwa/sveltekit": "^0.2.1",
"@vite-pwa/sveltekit": "^0.1.3",
"chalk": "^5.2.0",
"chokidar": "^3.5.3",
"cross-env": "^7.0.3",
"daisyui": "^2.51.6",
"eslint": "^8.40.0",
"eslint": "^8.41.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-svelte3": "^4.0.0",
"fenceparser": "^2.2.0",
@ -56,7 +56,7 @@
"github-slugger": "^2.0.0",
"mdast-util-to-string": "^3.2.0",
"mdsvex": "^0.10.6",
"netlify-cli": "^15.1.1",
"netlify-cli": "^15.2.0",
"npm-run-all": "^4.1.5",
"postcss": "^8.4.23",
"postcss-lightningcss": "^0.7.0",
@ -68,23 +68,23 @@
"remark": "^14.0.3",
"remark-fff": "~0.5.3",
"remark-footnotes": "~2.0.0",
"rollup": "^3.22.0",
"rollup": "^3.23.0",
"shiki-twoslash": "^3.1.2",
"svelte": "^3.59.1",
"svelte-bricks": "^0.1.7",
"svelte-check": "^3.3.2",
"svelte-preprocess": "^5.0.3",
"svelte-check": "^3.4.3",
"svelte-preprocess": "^5.0.4",
"svelte-typeahead": "^4.4.1",
"sveltekit-embed": "^0.0.12",
"tailwindcss": "^3.3.2",
"tslib": "^2.5.1",
"tslib": "^2.5.2",
"typescript": "^5.0.4",
"unist-util-visit": "^4.1.2",
"unocss": "^0.51.13",
"vite": "^4.3.8",
"vite": "^4.3.9",
"vite-imagetools": "^4.0.19",
"vite-plugin-pwa": "^0.14.7",
"workbox-build": "^6.5.4",
"workbox-window": "^6.5.4"
"workbox-build": "^6.6.0",
"workbox-window": "^6.6.0"
}
}

File diff suppressed because it is too large Load diff

View file

@ -16,7 +16,7 @@ export default {
adapter: Object.keys(process.env).some(key => key === 'VERCEL')
? adapterVercel()
: Object.keys(process.env).some(key => key === 'NETLIFY')
? adapterNetlify({ edge: true })
? adapterNetlify()
: adapterStatic({
pages: 'build',
assets: 'build',
@ -25,6 +25,11 @@ export default {
prerender: {
handleMissingId: 'warn'
},
csp: { mode: 'auto' }
csp: {
mode: 'auto',
directives: {
'style-src': ['self', 'unsafe-inline', 'https://giscus.app']
}
}
}
} as Config

View file

@ -11,6 +11,7 @@ import { SvelteKitPWA } from '@vite-pwa/sveltekit'
import TailwindCSS from 'tailwindcss'
import tailwindConfig from './tailwind.config'
import LightningCSS from 'postcss-lightningcss'
import { presetWebFonts } from 'unocss'
export default defineConfig({
envPrefix: 'URARA_',
@ -33,7 +34,25 @@ export default defineConfig({
presetTagify({
extraProperties: (matched: string) => (matched.startsWith('i-') ? { display: 'inline-block' } : {})
}),
presetIcons({ scale: 1.5 })
presetIcons({ scale: 1.5 }),
presetWebFonts({
provider: 'bunny',
fonts: {
sans: 'Lato',
mono: ['Fira Code', 'Fira Mono:400,700'],
lato: [
{
name: 'Lato',
weights: ['400', '700'],
italic: true
},
{
name: 'sans-serif',
provider: 'none'
}
]
}
})
]
}),
imagetools(),

File diff suppressed because one or more lines are too long