export default function buildOutput(o:WPACK.OPTS){ const isServer = o.isServer; const isClient = !isServer; const STORAGE_IS_MEMORY = (o.storage == 'memory'); const outputContext = o.outputContext; const outputPath = o.outputPath; const output = { path: STORAGE_IS_MEMORY ? '/' : outputContext , filename:`${outputPath}/[name].js` , publicPath: isServer ? '/' : `${o.hot_url}` , libraryTarget: isServer ? 'commonjs2' : 'var' , hotUpdateChunkFilename: `${outputPath}/hot/[id].[hash].hot-update.js` , hotUpdateMainFilename:`${outputPath}/hot/[hash].hot-update.json` }; return output; }