Tiny fixes + start pre-rendering
This commit is contained in:
parent
5a07064eee
commit
57ba033a91
|
@ -19,7 +19,7 @@ class Kernel extends HttpKernel
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $middleware = [
|
protected $middleware = [
|
||||||
// \App\Http\Middleware\TrustHosts::class,
|
// \App\Http\Middleware\TrustHosts::class,
|
||||||
\App\Http\Middleware\TrustProxies::class,
|
\App\Http\Middleware\TrustProxies::class,
|
||||||
\Illuminate\Http\Middleware\HandleCors::class,
|
\Illuminate\Http\Middleware\HandleCors::class,
|
||||||
\App\Http\Middleware\PreventRequestsDuringMaintenance::class,
|
\App\Http\Middleware\PreventRequestsDuringMaintenance::class,
|
||||||
|
|
|
@ -26,6 +26,7 @@ export const useContentStore = (mapKey = 'id') => {
|
||||||
}
|
}
|
||||||
|
|
||||||
function save(items) {
|
function save(items) {
|
||||||
|
if (!items) return
|
||||||
if (!Array.isArray(items)) items = [items]
|
if (!Array.isArray(items)) items = [items]
|
||||||
items.forEach((item) => {
|
items.forEach((item) => {
|
||||||
content.value.set(item[mapKey], item)
|
content.value.set(item[mapKey], item)
|
||||||
|
|
|
@ -12,14 +12,16 @@ if (opnformConfig.sentry_dsn) {
|
||||||
modules.push('@nuxtjs/sentry')
|
modules.push('@nuxtjs/sentry')
|
||||||
}
|
}
|
||||||
|
|
||||||
const cachedRoutes = [
|
const preRenderedRoutes = [
|
||||||
'/',
|
'/',
|
||||||
'/ai-form-builder',
|
'/ai-form-builder',
|
||||||
'/login',
|
'/login',
|
||||||
'/register',
|
'/register',
|
||||||
'/privacy-policy',
|
// '/privacy-policy',
|
||||||
'/terms-conditions',
|
// '/terms-conditions',
|
||||||
].reduce((acc, curr) => (acc[curr] = {swr: 60 * 60}, acc), {});
|
'/templates',
|
||||||
|
'/templates/*',
|
||||||
|
].reduce((acc, curr) => (acc[curr] = {prerender: true}, acc), {});
|
||||||
|
|
||||||
export default defineNuxtConfig({
|
export default defineNuxtConfig({
|
||||||
devtools: {enabled: true},
|
devtools: {enabled: true},
|
||||||
|
@ -55,8 +57,5 @@ export default defineNuxtConfig({
|
||||||
},
|
},
|
||||||
'~/components',
|
'~/components',
|
||||||
],
|
],
|
||||||
routeRules: { ... cachedRoutes},
|
routeRules: { ... preRenderedRoutes}
|
||||||
devServer: {
|
|
||||||
https: true,
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
|
@ -55,7 +55,7 @@ export const loadAllTemplates = async (store, options={}) => {
|
||||||
if (!store.allLoaded) {
|
if (!store.allLoaded) {
|
||||||
store.startLoading()
|
store.startLoading()
|
||||||
store.initTypesAndIndustries()
|
store.initTypesAndIndustries()
|
||||||
const {data} = await fetchAllTemplates(options)
|
const {data,error} = await fetchAllTemplates(options)
|
||||||
store.set(data.value)
|
store.set(data.value)
|
||||||
store.stopLoading()
|
store.stopLoading()
|
||||||
store.allLoaded = true
|
store.allLoaded = true
|
||||||
|
|
|
@ -11,12 +11,6 @@
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"repositories": [
|
|
||||||
{
|
|
||||||
"type": "vcs",
|
|
||||||
"url": "https://github.com/JhumanJ/laravel-notion-api.git"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^8.2",
|
"php": "^8.2",
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -17,7 +17,6 @@
|
||||||
"axios": "^0.21.1",
|
"axios": "^0.21.1",
|
||||||
"chart.js": "^4.4.0",
|
"chart.js": "^4.4.0",
|
||||||
"clone-deep": "^4.0.1",
|
"clone-deep": "^4.0.1",
|
||||||
"crisp-sdk-web": "^1.0.21",
|
|
||||||
"date-fns": "^2.28.0",
|
"date-fns": "^2.28.0",
|
||||||
"debounce": "^1.2.1",
|
"debounce": "^1.2.1",
|
||||||
"fuse.js": "^6.4.6",
|
"fuse.js": "^6.4.6",
|
||||||
|
|
Loading…
Reference in New Issue