mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
feat: inject sw script to pages
This commit is contained in:
parent
360bba7d80
commit
6e1678316e
@ -33,6 +33,7 @@ export interface SLSOptions {
|
||||
version: string
|
||||
}
|
||||
hooks: { [key: string]: any } // TODO: export from hookable
|
||||
nuxtHooks: NuxtOptions['hooks']
|
||||
}
|
||||
|
||||
export interface SLSConfig extends Omit<Partial<SLSOptions>, 'targetDir'> {
|
||||
|
@ -26,6 +26,10 @@ export default <Module> function slsModule () {
|
||||
]))
|
||||
}
|
||||
|
||||
if (options.nuxtHooks) {
|
||||
nuxt.addHooks(options.nuxtHooks)
|
||||
}
|
||||
|
||||
nuxt.hook('generate:cache:ignore', (ignore) => {
|
||||
ignore.push(options.slsDir)
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user