File tree Expand file tree Collapse file tree 4 files changed +14
-31
lines changed Expand file tree Collapse file tree 4 files changed +14
-31
lines changed Original file line number Diff line number Diff line change 1- import { resolve } from 'path'
2- import type { NuxtConfig } from '@nuxt/types'
3- import { resolveConfig } from '../../../src/index'
1+ import { nuxtConfig } from '../../../src/index'
42
5- export default < NuxtConfig > resolveConfig ( {
6- name : 'myApp' ,
7- rootDir : __dirname ,
3+ export default nuxtConfig ( {
4+ name : 'MyApp' ,
85 extends : '../themes/red/nuxt.config' ,
9-
10- components : [
11- resolve ( __dirname , 'components' )
12- ]
6+ rootDir : __dirname
137} )
Original file line number Diff line number Diff line change 1- import { resolve } from 'path'
2- import type { NuxtConfig } from '@nuxt/types'
3- import { resolveConfig } from '../../../../src/index'
1+ import { nuxtConfig } from '../../../../src/index'
42
5- export default < NuxtConfig > resolveConfig ( {
6- name : 'baseTheme ' ,
3+ export default nuxtConfig ( {
4+ name : 'BaseTheme ' ,
75 rootDir : __dirname ,
86 srcDir : __dirname ,
97
10- components : [
11- { path : resolve ( __dirname , 'components' ) , global : true }
12- ] ,
13-
148 publicRuntimeConfig : {
159 color : 'blue'
1610 }
Original file line number Diff line number Diff line change 1- import { resolve } from 'path '
1+ import { nuxtConfig } from '../../../../src/index '
22
3- export default {
4- name : 'baseThemeEx' ,
5- rootDir : __dirname ,
3+ export default nuxtConfig ( {
4+ name : 'RedTheme' ,
65 extends : '../base/nuxt.config' ,
7-
8- components : [
9- resolve ( __dirname , 'components' )
10- ] ,
6+ rootDir : __dirname ,
117
128 publicRuntimeConfig : {
139 color : 'red'
1410 }
15- }
11+ } )
Original file line number Diff line number Diff line change 1- import { resolve } from 'path'
2- import { resolveConfig } from '../src'
1+ import { nuxtConfig } from '../src'
32import config from './fixture/app/nuxt.config'
43
54const scrub = ( input ) => {
@@ -24,7 +23,7 @@ const scrub = (input) => {
2423
2524it ( 'fails on config being a function' , ( ) => {
2625 const config = ( ) => ( { } )
27- expect ( ( ) => resolveConfig ( config ) )
26+ expect ( ( ) => nuxtConfig ( config ) )
2827 . toThrow ( 'extending is not possible with nuxt config as a function' )
2928} )
3029
You can’t perform that action at this time.
0 commit comments