refactor: config prop rename serviceWorkerPath -> path

This commit is contained in:
Ayo Ayco 2024-08-03 01:10:00 +02:00
parent ea673e6bdd
commit 881c946a0a
2 changed files with 5 additions and 5 deletions

View file

@ -10,8 +10,8 @@ export default defineConfig({
}),
integrations: [
serviceWorker({
path: "./src/utils/sw.js",
assetCachePrefix: 'cozy-reader',
serviceWorkerPath: './src/utils/sw.js'
})
]
});

View file

@ -9,7 +9,7 @@ let assets: string[] = [];
export type ServiceWorkerConfig = {
assetCachePrefix?: string,
assetCacheVersionID?: string,
serviceWorkerPath: string,
path: string,
}
const plugin_dir = path.resolve(path.dirname('.'));
@ -18,7 +18,7 @@ export default (config: ServiceWorkerConfig): AstroIntegration => {
let {
assetCachePrefix,
assetCacheVersionID = randomUUID(),
serviceWorkerPath
path: serviceWorkerPath
} = config;
console.log('[astro-sw] dir', plugin_dir)