From ab794e73e3fce6de51485aa1837344117941fc9f Mon Sep 17 00:00:00 2001 From: kunish Date: Thu, 10 Oct 2024 19:24:19 +0800 Subject: [PATCH] fix(pwa): items in includeAssets cannot be empty string --- .prettierignore | 1 + auto-imports.d.ts | 162 +++++++++++++++++++++++----------------------- vite.config.ts | 2 +- 3 files changed, 83 insertions(+), 82 deletions(-) diff --git a/.prettierignore b/.prettierignore index a3414d0..3c88513 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,2 +1,3 @@ +auto-imports.d.ts dist CHANGELOG.md diff --git a/auto-imports.d.ts b/auto-imports.d.ts index 3c83a6d..0eb347f 100644 --- a/auto-imports.d.ts +++ b/auto-imports.d.ts @@ -4,65 +4,65 @@ // noinspection JSUnusedGlobalSymbols // Generated by unplugin-auto-import // biome-ignore lint: disable -export { } +export {} declare global { const $DEVCOMP: (typeof import('solid-js'))['$DEVCOMP'] const $PROXY: (typeof import('solid-js'))['$PROXY'] const $TRACK: (typeof import('solid-js'))['$TRACK'] - const A: (typeof import('@solidjs/router'))['A'] + const A: typeof import('@solidjs/router')['A'] const Assets: (typeof import('solid-js/web'))['Assets'] const DEV: (typeof import('solid-js'))['DEV'] - const Dynamic: (typeof import('solid-js/web'))['Dynamic'] - const ErrorBoundary: (typeof import('solid-js'))['ErrorBoundary'] - const For: (typeof import('solid-js'))['For'] - const HashRouter: (typeof import('@solidjs/router'))['HashRouter'] + const Dynamic: typeof import('solid-js/web')['Dynamic'] + const ErrorBoundary: typeof import('solid-js')['ErrorBoundary'] + const For: typeof import('solid-js')['For'] + const HashRouter: typeof import('@solidjs/router')['HashRouter'] const Hydration: (typeof import('solid-js/web'))['Hydration'] const HydrationScript: (typeof import('solid-js/web'))['HydrationScript'] - const Index: (typeof import('solid-js'))['Index'] + const Index: typeof import('solid-js')['Index'] const Link: (typeof import('@solidjs/router'))['Link'] - const Match: (typeof import('solid-js'))['Match'] - const MemoryRouter: (typeof import('@solidjs/router'))['MemoryRouter'] + const Match: typeof import('solid-js')['Match'] + const MemoryRouter: typeof import('@solidjs/router')['MemoryRouter'] const NavLink: (typeof import('@solidjs/router'))['NavLink'] - const Navigate: (typeof import('@solidjs/router'))['Navigate'] + const Navigate: typeof import('@solidjs/router')['Navigate'] const NoHydration: (typeof import('solid-js/web'))['NoHydration'] const Outlet: (typeof import('@solidjs/router'))['Outlet'] - const Portal: (typeof import('solid-js/web'))['Portal'] + const Portal: typeof import('solid-js/web')['Portal'] const RequestContext: (typeof import('solid-js/web'))['RequestContext'] - const Route: (typeof import('@solidjs/router'))['Route'] - const Router: (typeof import('@solidjs/router'))['Router'] + const Route: typeof import('@solidjs/router')['Route'] + const Router: typeof import('@solidjs/router')['Router'] const Routes: (typeof import('@solidjs/router'))['Routes'] - const Show: (typeof import('solid-js'))['Show'] - const StaticRouter: (typeof import('@solidjs/router'))['StaticRouter'] - const Suspense: (typeof import('solid-js'))['Suspense'] - const SuspenseList: (typeof import('solid-js'))['SuspenseList'] - const Switch: (typeof import('solid-js'))['Switch'] - const _mergeSearchString: (typeof import('@solidjs/router'))['_mergeSearchString'] - const action: (typeof import('@solidjs/router'))['action'] + const Show: typeof import('solid-js')['Show'] + const StaticRouter: typeof import('@solidjs/router')['StaticRouter'] + const Suspense: typeof import('solid-js')['Suspense'] + const SuspenseList: typeof import('solid-js')['SuspenseList'] + const Switch: typeof import('solid-js')['Switch'] + const _mergeSearchString: typeof import('@solidjs/router')['_mergeSearchString'] + const action: typeof import('@solidjs/router')['action'] const addEventListener: (typeof import('solid-js/web'))['addEventListener'] - const batch: (typeof import('solid-js'))['batch'] - const cache: (typeof import('@solidjs/router'))['cache'] + const batch: typeof import('solid-js')['batch'] + const cache: typeof import('@solidjs/router')['cache'] const catchError: (typeof import('solid-js'))['catchError'] - const children: (typeof import('solid-js'))['children'] - const createAsync: (typeof import('@solidjs/router'))['createAsync'] - const createAsyncStore: (typeof import('@solidjs/router'))['createAsyncStore'] - const createBeforeLeave: (typeof import('@solidjs/router'))['createBeforeLeave'] + const children: typeof import('solid-js')['children'] + const createAsync: typeof import('@solidjs/router')['createAsync'] + const createAsyncStore: typeof import('@solidjs/router')['createAsyncStore'] + const createBeforeLeave: typeof import('@solidjs/router')['createBeforeLeave'] const createComponent: (typeof import('solid-js'))['createComponent'] const createComputed: (typeof import('solid-js'))['createComputed'] - const createContext: (typeof import('solid-js'))['createContext'] - const createDeferred: (typeof import('solid-js'))['createDeferred'] - const createEffect: (typeof import('solid-js'))['createEffect'] + const createContext: typeof import('solid-js')['createContext'] + const createDeferred: typeof import('solid-js')['createDeferred'] + const createEffect: typeof import('solid-js')['createEffect'] const createIntegration: (typeof import('@solidjs/router'))['createIntegration'] - const createMemo: (typeof import('solid-js'))['createMemo'] - const createMemoryHistory: (typeof import('@solidjs/router'))['createMemoryHistory'] - const createMutable: (typeof import('solid-js/store'))['createMutable'] + const createMemo: typeof import('solid-js')['createMemo'] + const createMemoryHistory: typeof import('@solidjs/router')['createMemoryHistory'] + const createMutable: typeof import('solid-js/store')['createMutable'] const createReaction: (typeof import('solid-js'))['createReaction'] - const createRenderEffect: (typeof import('solid-js'))['createRenderEffect'] - const createResource: (typeof import('solid-js'))['createResource'] - const createRoot: (typeof import('solid-js'))['createRoot'] - const createRouter: (typeof import('@solidjs/router'))['createRouter'] - const createSelector: (typeof import('solid-js'))['createSelector'] - const createSignal: (typeof import('solid-js'))['createSignal'] - const createStore: (typeof import('solid-js/store'))['createStore'] + const createRenderEffect: typeof import('solid-js')['createRenderEffect'] + const createResource: typeof import('solid-js')['createResource'] + const createRoot: typeof import('solid-js')['createRoot'] + const createRouter: typeof import('@solidjs/router')['createRouter'] + const createSelector: typeof import('solid-js')['createSelector'] + const createSignal: typeof import('solid-js')['createSignal'] + const createStore: typeof import('solid-js/store')['createStore'] const createUniqueId: (typeof import('solid-js'))['createUniqueId'] const delegateEvents: (typeof import('solid-js/web'))['delegateEvents'] const enableExternalSource: (typeof import('solid-js'))['enableExternalSource'] @@ -78,42 +78,42 @@ declare global { const getOwner: (typeof import('solid-js'))['getOwner'] const getRequestEvent: (typeof import('solid-js/web'))['getRequestEvent'] const hashIntegration: (typeof import('@solidjs/router'))['hashIntegration'] - const hydrate: (typeof import('solid-js/web'))['hydrate'] - const indexArray: (typeof import('solid-js'))['indexArray'] + const hydrate: typeof import('solid-js/web')['hydrate'] + const indexArray: typeof import('solid-js')['indexArray'] const insert: (typeof import('solid-js/web'))['insert'] const isDev: (typeof import('solid-js/web'))['isDev'] - const isServer: (typeof import('solid-js/web'))['isServer'] - const json: (typeof import('@solidjs/router'))['json'] - const keepDepth: (typeof import('@solidjs/router'))['keepDepth'] - const lazy: (typeof import('solid-js'))['lazy'] - const mapArray: (typeof import('solid-js'))['mapArray'] - const mergeProps: (typeof import('solid-js'))['mergeProps'] + const isServer: typeof import('solid-js/web')['isServer'] + const json: typeof import('@solidjs/router')['json'] + const keepDepth: typeof import('@solidjs/router')['keepDepth'] + const lazy: typeof import('solid-js')['lazy'] + const mapArray: typeof import('solid-js')['mapArray'] + const mergeProps: typeof import('solid-js')['mergeProps'] const normalizeIntegration: (typeof import('@solidjs/router'))['normalizeIntegration'] - const notifyIfNotBlocked: (typeof import('@solidjs/router'))['notifyIfNotBlocked'] - const observable: (typeof import('solid-js'))['observable'] - const on: (typeof import('solid-js'))['on'] - const onCleanup: (typeof import('solid-js'))['onCleanup'] - const onError: (typeof import('solid-js'))['onError'] - const onMount: (typeof import('solid-js'))['onMount'] + const notifyIfNotBlocked: typeof import('@solidjs/router')['notifyIfNotBlocked'] + const observable: typeof import('solid-js')['observable'] + const on: typeof import('solid-js')['on'] + const onCleanup: typeof import('solid-js')['onCleanup'] + const onError: typeof import('solid-js')['onError'] + const onMount: typeof import('solid-js')['onMount'] const pathIntegration: (typeof import('@solidjs/router'))['pathIntegration'] const pipeToNodeWritable: (typeof import('solid-js/web'))['pipeToNodeWritable'] const pipeToWritable: (typeof import('solid-js/web'))['pipeToWritable'] - const produce: (typeof import('solid-js/store'))['produce'] - const reconcile: (typeof import('solid-js/store'))['reconcile'] - const redirect: (typeof import('@solidjs/router'))['redirect'] - const reload: (typeof import('@solidjs/router'))['reload'] - const render: (typeof import('solid-js/web'))['render'] - const renderToStream: (typeof import('solid-js/web'))['renderToStream'] - const renderToString: (typeof import('solid-js/web'))['renderToString'] - const renderToStringAsync: (typeof import('solid-js/web'))['renderToStringAsync'] + const produce: typeof import('solid-js/store')['produce'] + const reconcile: typeof import('solid-js/store')['reconcile'] + const redirect: typeof import('@solidjs/router')['redirect'] + const reload: typeof import('@solidjs/router')['reload'] + const render: typeof import('solid-js/web')['render'] + const renderToStream: typeof import('solid-js/web')['renderToStream'] + const renderToString: typeof import('solid-js/web')['renderToString'] + const renderToStringAsync: typeof import('solid-js/web')['renderToStringAsync'] const requestCallback: (typeof import('solid-js'))['requestCallback'] const resetErrorBoundaries: (typeof import('solid-js'))['resetErrorBoundaries'] const resolveSSRNode: (typeof import('solid-js/web'))['resolveSSRNode'] - const revalidate: (typeof import('@solidjs/router'))['revalidate'] + const revalidate: typeof import('@solidjs/router')['revalidate'] const runWithOwner: (typeof import('solid-js'))['runWithOwner'] - const saveCurrentDepth: (typeof import('@solidjs/router'))['saveCurrentDepth'] + const saveCurrentDepth: typeof import('@solidjs/router')['saveCurrentDepth'] const sharedConfig: (typeof import('solid-js'))['sharedConfig'] - const splitProps: (typeof import('solid-js'))['splitProps'] + const splitProps: typeof import('solid-js')['splitProps'] const spread: (typeof import('solid-js/web'))['spread'] const ssr: (typeof import('solid-js/web'))['ssr'] const ssrAttribute: (typeof import('solid-js/web'))['ssrAttribute'] @@ -124,24 +124,24 @@ declare global { const ssrStyle: (typeof import('solid-js/web'))['ssrStyle'] const startTransition: (typeof import('solid-js'))['startTransition'] const staticIntegration: (typeof import('@solidjs/router'))['staticIntegration'] - const untrack: (typeof import('solid-js'))['untrack'] - const useAction: (typeof import('@solidjs/router'))['useAction'] + const untrack: typeof import('solid-js')['untrack'] + const useAction: typeof import('@solidjs/router')['useAction'] const useAssets: (typeof import('solid-js/web'))['useAssets'] - const useBeforeLeave: (typeof import('@solidjs/router'))['useBeforeLeave'] - const useContext: (typeof import('solid-js'))['useContext'] - const useCurrentMatches: (typeof import('@solidjs/router'))['useCurrentMatches'] - const useHref: (typeof import('@solidjs/router'))['useHref'] - const useIsRouting: (typeof import('@solidjs/router'))['useIsRouting'] - const useLocation: (typeof import('@solidjs/router'))['useLocation'] - const useMatch: (typeof import('@solidjs/router'))['useMatch'] - const useNavigate: (typeof import('@solidjs/router'))['useNavigate'] - const useParams: (typeof import('@solidjs/router'))['useParams'] - const usePreloadRoute: (typeof import('@solidjs/router'))['usePreloadRoute'] - const useResolvedPath: (typeof import('@solidjs/router'))['useResolvedPath'] + const useBeforeLeave: typeof import('@solidjs/router')['useBeforeLeave'] + const useContext: typeof import('solid-js')['useContext'] + const useCurrentMatches: typeof import('@solidjs/router')['useCurrentMatches'] + const useHref: typeof import('@solidjs/router')['useHref'] + const useIsRouting: typeof import('@solidjs/router')['useIsRouting'] + const useLocation: typeof import('@solidjs/router')['useLocation'] + const useMatch: typeof import('@solidjs/router')['useMatch'] + const useNavigate: typeof import('@solidjs/router')['useNavigate'] + const useParams: typeof import('@solidjs/router')['useParams'] + const usePreloadRoute: typeof import('@solidjs/router')['usePreloadRoute'] + const useResolvedPath: typeof import('@solidjs/router')['useResolvedPath'] const useRouteData: (typeof import('@solidjs/router'))['useRouteData'] const useRoutes: (typeof import('@solidjs/router'))['useRoutes'] - const useSearchParams: (typeof import('@solidjs/router'))['useSearchParams'] - const useSubmission: (typeof import('@solidjs/router'))['useSubmission'] - const useSubmissions: (typeof import('@solidjs/router'))['useSubmissions'] - const useTransition: (typeof import('solid-js'))['useTransition'] + const useSearchParams: typeof import('@solidjs/router')['useSearchParams'] + const useSubmission: typeof import('@solidjs/router')['useSubmission'] + const useSubmissions: typeof import('@solidjs/router')['useSubmissions'] + const useTransition: typeof import('solid-js')['useTransition'] } diff --git a/vite.config.ts b/vite.config.ts index 7d6f8b3..0f96548 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -24,7 +24,7 @@ export default defineConfig({ VitePWA({ registerType: 'autoUpdate', - includeAssets: ['favicon.svg', ''], + includeAssets: ['favicon.svg'], workbox: { maximumFileSizeToCacheInBytes: 5 * 1024 * 1024 }, manifest: { name: 'MetaCubeXD',