code: function wrapOptionsForNei(config, targetDir) {
    if(config.hasOwnProperty('changeOrigin') && !config.changeOrigin){// 之前的配置没有changeOrigin,向下兼容
      config.changeOrigin = false;
    }else {
      config.changeOrigin = true;
    }
    nei.setting({
      projectKey: config.projectKey,
      online: config.online,
      reload: config.reload,
      view: path.resolve(targetDir, config.viewRoot) + '/',
      openUrl: config.openUrl,
      mockTpl: path.resolve(targetDir, config.mockTpl || '') + '/',
      mockApi: path.resolve(targetDir, config.mockApi || '') + '/',
      viewExt: config.viewExt || '.ftl',
      changeOrigin: config.changeOrigin,
      fmpp: config.fmpp || {},
      apiResHeaders: config.apiResHeaders || {},
      modelServer: config.modelServer
    });
    config.routes = nei.getRoutes(config.routes);
  
    return {
      port: config.port,
      rules: config.routes,
      online: config.online,
      reload: config.reload,
      watchingFiles: config.watchingFiles,
      dir: path.resolve(targetDir, config.webRoot) + '/',
      views: path.resolve(targetDir, config.viewRoot) + '/',
      openUrl: config.openUrl,
      launch: config.launch,
      engine: config.engine || 'freemarker',
      ext: config.viewExt || '.ftl',
      changeOrigin: config.changeOrigin,
      nei: true,
      https: config.https
    };
  }
docs: 包装nei配置文件