Skip to content

Commit

Permalink
feat: updated to latest nuxt
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Milfred committed Jan 7, 2025
1 parent c3907eb commit e195375
Show file tree
Hide file tree
Showing 6 changed files with 985 additions and 1,040 deletions.
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18.20.5
4 changes: 2 additions & 2 deletions .playground/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ const { $umbracoClient } = useNuxtApp();
let data = await $umbracoClient.fetchData({
params: {
cache: false,
parts: ['contenat'],
parts: ['content'],
},
route: '/sdjsdjkdshjk',
route: '/',
cachingOptions: {
maxAge: 60,
name: 'getData',
Expand Down
5 changes: 5 additions & 0 deletions .playground/nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,10 @@ export default defineNuxtConfig({
},
},

devServer: {
port: 8000
},
experimental: { appManifest: false },

compatibilityDate: '2024-08-27',
})
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
"test": "exit 0"
},
"dependencies": {
"@nuxt/kit": "^3.13.0"
"@nuxt/kit": "^3.15.1"
},
"devDependencies": {
"@nuxt/module-builder": "^0.8.3",
"@nuxt/schema": "^3.13.0",
"eslint": "^9.9.1",
"nuxt": "^3.13.0",
"typescript": "^5.5.4"
"@nuxt/schema": "^3.15.1",
"eslint": "^9.17.0",
"nuxt": "^3.15.1",
"typescript": "^5.7.2"
}
}
2 changes: 1 addition & 1 deletion src/runtime/server/api/data.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { defineEventHandler, readBody, appendHeader, createError } from 'h3';
import { useRuntimeConfig } from '#nitro';
const config = useRuntimeConfig();

export default defineEventHandler(async (event) => {
const config = useRuntimeConfig();
const { headers: reqHeaders = {}, method, url } = event.node.req || {};
const target = new URL(
url.replace(/^\/api\/data/, config.getdataEndpointUrl || '/umbraco/api/spa/getdata/'),
Expand Down
Loading

0 comments on commit e195375

Please sign in to comment.