docs: async function renderJS (options, filePath, data) {
    const vmOpts = { data, components: {} }
    const element = requireModule(filePath)
  
    if (element && element.options && element.options.name) { // defined via global register (Vue.component)
      const { name } = element.options
      vmOpts.template = `<${name} ${dataToProps(data)} />`
    } else if (element && element.name) { // defined via export
      const { name } = element
      vmOpts.components[name] = element // register component locally
      vmOpts.template = `<${kebabcase(name)} ${dataToProps(data)} />`
    } else { // no export, throw error with explanation
      throw new Error(`The file "${filePath}" does not export a Vue component. Please expose the component via "module.exports" or "export default".`)
    }
  
    const vm = new Vue(vmOpts)
  
    const rendered = await renderVm(options, filePath, data, vm)
  
    return rendered
  }