How to use the umi-utils.optsToArray function in umi-utils

To help you get started, we’ve selected a few umi-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github umijs / umi / packages / umi-plugin-dva / src / index.js View on Github external
function getGlobalModelContent() {
    return exclude(getGlobalModels(api, shouldImportDynamic), optsToArray(opts.exclude))
      .map(path =>
        `
    app.model({ namespace: '${basename(path, extname(path))}', ...(require('${path}').default) });
  `.trim(),
      )
      .join('\r\n');
  }