Integrate flyfish CAD viewer
This commit is contained in:
+12
-4
@@ -17,7 +17,7 @@ export default defineConfig({
|
||||
includeAssets: ['icons/favicon.svg', 'icons/apple-touch-icon.png'],
|
||||
manifest: {
|
||||
name: '万能看图 · DWG/PDF 浏览',
|
||||
short_name: '涓囪兘鐪嬪浘',
|
||||
short_name: '万能看图',
|
||||
description:
|
||||
'手机与平板上的 DWG 图纸浏览器,支持模型空间与布局空间、图层控制、测量,以及 PDF / EPUB / XPS / CBZ / 图片阅读。',
|
||||
lang: 'zh-CN',
|
||||
@@ -55,20 +55,28 @@ export default defineConfig({
|
||||
]
|
||||
},
|
||||
workbox: {
|
||||
globPatterns: ['**/*.{js,css,html,svg,png,ico,woff2}'],
|
||||
globPatterns: ['**/*.{js,css,html,svg,png,ico,woff2,wasm}'],
|
||||
globIgnores: ['**/vendor/**', '**/samples/**'],
|
||||
maximumFileSizeToCacheInBytes: 4 * 1024 * 1024,
|
||||
maximumFileSizeToCacheInBytes: 12 * 1024 * 1024,
|
||||
navigateFallback: 'index.html',
|
||||
cleanupOutdatedCaches: true,
|
||||
runtimeCaching: [
|
||||
{
|
||||
urlPattern: /\/vendor\/(?:libredwg|mupdf)\//,
|
||||
urlPattern: /\/vendor\/mupdf\//,
|
||||
handler: 'CacheFirst',
|
||||
options: {
|
||||
cacheName: 'viewer-engines-v1',
|
||||
expiration: { maxEntries: 12, maxAgeSeconds: 60 * 60 * 24 * 365 }
|
||||
}
|
||||
},
|
||||
{
|
||||
urlPattern: /\/wasm\//,
|
||||
handler: 'CacheFirst',
|
||||
options: {
|
||||
cacheName: 'viewer-cad-wasm-v1',
|
||||
expiration: { maxEntries: 8, maxAgeSeconds: 60 * 60 * 24 * 365 }
|
||||
}
|
||||
},
|
||||
{
|
||||
urlPattern: /\/samples\//,
|
||||
handler: 'CacheFirst',
|
||||
|
||||
Reference in New Issue
Block a user