UNPKG

694 BJavaScriptView Raw
1const { runWebpackCompiler } = require("./compiler");
2
3module.exports = function($logger, $liveSyncService, hookArgs) {
4 const { config } = hookArgs;
5 const bundle = config && config.appFilesUpdaterOptions && config.appFilesUpdaterOptions.bundle;
6 if (bundle) {
7 const env = config.env || {};
8 env.hmr = config.appFilesUpdaterOptions.useHotModuleReload;
9 const platform = config.platform;
10 const release = config && config.appFilesUpdaterOptions && config.appFilesUpdaterOptions.release;
11 const compilerConfig = {
12 env,
13 platform,
14 bundle,
15 release,
16 watch: true
17 };
18
19 return runWebpackCompiler(compilerConfig, hookArgs.projectData, $logger, $liveSyncService, hookArgs);
20 }
21}
22