mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Configure for layer0 deployment
This commit is contained in:
parent
f252322ccc
commit
a8842fbb41
4 changed files with 32 additions and 0 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -89,3 +89,5 @@ dist
|
||||||
.DS_Store
|
.DS_Store
|
||||||
/static/tailwind.css
|
/static/tailwind.css
|
||||||
/.vscode/snipsnap.code-snippets
|
/.vscode/snipsnap.code-snippets
|
||||||
|
# Layer0 generated build directory
|
||||||
|
.layer0
|
||||||
|
|
|
||||||
10
layer0.config.js
Normal file
10
layer0.config.js
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
'use strict'
|
||||||
|
|
||||||
|
// This file was automatically added by layer0 deploy.
|
||||||
|
// You should commit this file to source control.
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
backends: {},
|
||||||
|
includeNodeModules: true,
|
||||||
|
connector: '@layer0/nuxt',
|
||||||
|
}
|
||||||
11
routes.js
Normal file
11
routes.js
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
// This file was added by layer0 init.
|
||||||
|
// You should commit this file to source control.
|
||||||
|
|
||||||
|
const { Router } = require('@layer0/core/router')
|
||||||
|
const { nuxtRoutes } = require('@layer0/nuxt')
|
||||||
|
|
||||||
|
module.exports = new Router()
|
||||||
|
.match('/service-worker.js', ({ serviceWorker }) => {
|
||||||
|
serviceWorker('.nuxt/dist/client/service-worker.js')
|
||||||
|
})
|
||||||
|
.use(nuxtRoutes)
|
||||||
9
sw/service-worker.js
Normal file
9
sw/service-worker.js
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
import { skipWaiting, clientsClaim } from 'workbox-core'
|
||||||
|
import { precacheAndRoute } from 'workbox-precaching'
|
||||||
|
import { Prefetcher } from '@layer0/prefetch/sw'
|
||||||
|
|
||||||
|
skipWaiting()
|
||||||
|
clientsClaim()
|
||||||
|
precacheAndRoute(self.__WB_MANIFEST || [])
|
||||||
|
|
||||||
|
new Prefetcher().route()
|
||||||
Loading…
Add table
Add a link
Reference in a new issue