refactor: config prop rename serviceWorkerPath -> path
This commit is contained in:
parent
ea673e6bdd
commit
881c946a0a
2 changed files with 5 additions and 5 deletions
|
@ -10,8 +10,8 @@ export default defineConfig({
|
|||
}),
|
||||
integrations: [
|
||||
serviceWorker({
|
||||
path: "./src/utils/sw.js",
|
||||
assetCachePrefix: 'cozy-reader',
|
||||
serviceWorkerPath: './src/utils/sw.js'
|
||||
})
|
||||
]
|
||||
});
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue