Skip to content

Commit 0e37a6c

Browse files
committedNov 24, 2024·
fix!: upgrade nuxt-site-config v3
1 parent 8d46c6f commit 0e37a6c

File tree

5 files changed

+16
-38
lines changed

5 files changed

+16
-38
lines changed
 

Diff for: ‎package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@
6262
"execa": "^9.5.1",
6363
"image-size": "^1.1.1",
6464
"magic-string": "^0.30.13",
65-
"nuxt-site-config": "^2.2.21",
66-
"nuxt-site-config-kit": "^2.2.21",
65+
"nuxt-site-config": "^3.0.2",
6766
"nypm": "^0.3.12",
6867
"ofetch": "^1.4.1",
6968
"ohash": "^1.1.4",

Diff for: ‎pnpm-lock.yaml

+14-17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: ‎src/build/generate.ts

-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import type { Resolver } from '@nuxt/kit'
22
import type { Nuxt } from '@nuxt/schema'
33
import type { ModuleOptions } from '../module'
44
import { useNuxt } from '@nuxt/kit'
5-
import { assertSiteConfig } from 'nuxt-site-config-kit'
65
import { applyNitroPresetCompatibility } from '../compatibility'
76

87
// we don't need any of the runtime dependencies when we use nuxt generate
@@ -20,10 +19,5 @@ export function setupGenerateHandler(options: ModuleOptions, resolve: Resolver['
2019
},
2120
resolve,
2221
})
23-
assertSiteConfig('nuxt-og-image', {
24-
url: 'OG Image tags are required to be absolute URLs.',
25-
}, {
26-
throwError: true,
27-
})
2822
})
2923
}

Diff for: ‎src/build/prerender.ts

-12
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import type { Resolver } from '@nuxt/kit'
22
import type { Nuxt } from '@nuxt/schema'
33
import type { ModuleOptions } from '../module'
44
import { useNuxt } from '@nuxt/kit'
5-
import { assertSiteConfig } from 'nuxt-site-config-kit'
65
import { applyNitroPresetCompatibility } from '../compatibility'
76

87
// prerender will always be called when using nuxi generate and sometimes be used when using nuxi build
@@ -15,17 +14,6 @@ export function setupPrerenderHandler(options: ModuleOptions, resolve: Resolver[
1514
// avoid wasm handling while prerendering
1615
nitroConfig.wasm = nitroConfig.wasm || {}
1716
nitroConfig.wasm.esmImport = false
18-
19-
// check if there are any pages in the config, these are paths without a file extension
20-
const prerenderingPages = (nuxt.options.nitro.prerender?.routes || [])
21-
.some(r => r && (!r.includes('.') || r.includes('*')))
22-
if (prerenderingPages) {
23-
assertSiteConfig('nuxt-og-image', {
24-
url: 'OG Image tags are required to be absolute URLs.',
25-
}, {
26-
throwError: false,
27-
})
28-
}
2917
})
3018
})
3119
}

Diff for: ‎src/module.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import {
3131
useLogger,
3232
} from '@nuxt/kit'
3333
import { defu } from 'defu'
34-
import { installNuxtSiteConfig } from 'nuxt-site-config-kit'
34+
import { installNuxtSiteConfig } from 'nuxt-site-config/kit'
3535
import { hash } from 'ohash'
3636
import { basename, isAbsolute, relative } from 'pathe'
3737
import { readPackageJSON } from 'pkg-types'

0 commit comments

Comments
 (0)
Please sign in to comment.