Skip to content
Thomas Digby edited this page Dec 19, 2016 · 2 revisions

If the parent projects component tree is going to be compiled/transpiled, can we delay the booting of the server/bundling of the client?

treeConfig and clientConfig are the relative webpack configs to output the component tree and the client bundle.

const build = (context, config, cb) => {
  new webpack(config(context), (err, stats) => {
    if (typeof cb === 'function') cb()
  })
}
build(cwd, treeConfig, () => {
  const config = require('./lib/tree.bundle')
  new Server({ config, cwd })
  build(cwd, clientConfig)
})

That seems gross, but I don't know how we can get around booting the server once the webpack compile is complete?

Clone this wiki locally