Skip to content

Commit

Permalink
fix(schema): access entire object 🤔
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Dec 25, 2023
1 parent 5d67a70 commit 23e98be
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/schema/src/config/experimental.ts
Expand Up @@ -13,7 +13,7 @@ export default defineUntypedSchema({
typescriptBundlerResolution: {
async $resolve (val, get) {
// TODO: remove in v3.10
val = val ?? await get('experimental.typescriptBundlerResolution')
val = val ?? await get('experimental').then((e: Record<string, any>) => e?.typescriptBundlerResolution)
if (typeof val === 'boolean') { return val }
const setting = await get('typescript.tsConfig.compilerOptions.moduleResolution')
if (setting) {
Expand All @@ -38,7 +38,7 @@ export default defineUntypedSchema({
inlineStyles: {
async $resolve (val, get) {
// TODO: remove in v3.10
val = val ?? await get('experimental.inlineSSRStyles')
val = val ?? await get('experimental').then((e: Record<string, any>) => e?.inlineSSRStyles)
if (val === false || (await get('dev')) || (await get('ssr')) === false || (await get('builder')) === '@nuxt/webpack-builder') {
return false
}
Expand All @@ -54,7 +54,7 @@ export default defineUntypedSchema({
noScripts: {
async $resolve (val, get) {
// TODO: remove in v3.10
return val ?? await get('experimental.noScripts') ?? false
return val ?? await get('experimental').then((e: Record<string, any>) => e?.noScripts) ?? false
}
},
},
Expand Down

0 comments on commit 23e98be

Please sign in to comment.