Nuxt/test/helpers/config.js
2018-03-16 19:42:06 +03:30

12 lines
327 B
JavaScript

import { resolve } from 'path'
import { requireModule } from '../../lib/common/module'
export function loadConfig(fixture, overrides) {
const rootDir = resolve(__dirname, '../fixtures/' + fixture)
const config = requireModule(resolve(rootDir, 'nuxt.config.js'))
return Object.assign({ rootDir }, config, overrides)
}