Nuxt/packages/cli/src/utils/webpack.js

12 lines
410 B
JavaScript
Raw Normal View History

2020-03-02 18:15:00 +00:00
import { core as importCore, builder as importBuilder } from '../imports'
export async function getWebpackConfig (name = 'client', loadOptions = {}) {
const { loadNuxt } = await importCore()
const { getBuilder } = await importBuilder()
const nuxt = await loadNuxt(loadOptions)
const builder = await getBuilder(nuxt)
const { bundleBuilder } = builder
return bundleBuilder.getWebpackConfig(name)
}