提交 d2149da5 编写于 作者: F Felix-Antoine Paradis 提交者: Arunoda Susiripala

Add the ability to pass next configuration to production builds (#2345)

上级 3a9c4191
......@@ -7,9 +7,9 @@ import webpack from './webpack'
import replaceCurrentBuild from './replace'
import md5File from 'md5-file/promise'
export default async function build (dir) {
export default async function build (dir, conf = null) {
const buildDir = join(tmpdir(), uuid.v4())
const compiler = await webpack(dir, { buildDir })
const compiler = await webpack(dir, { buildDir, conf })
try {
await runCompiler(compiler)
......
......@@ -27,9 +27,9 @@ const interpolateNames = new Map(defaultPages.map((p) => {
const relativeResolve = rootModuleRelativePath(require)
export default async function createCompiler (dir, { dev = false, quiet = false, buildDir } = {}) {
export default async function createCompiler (dir, { dev = false, quiet = false, buildDir, conf = null } = {}) {
dir = resolve(dir)
const config = getConfig(dir)
const config = getConfig(dir, conf)
const defaultEntries = dev ? [
join(__dirname, '..', '..', 'client', 'webpack-hot-middleware-client'),
join(__dirname, '..', '..', 'client', 'on-demand-entries-client')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册