index.js
// converts the image path in the markdowned-image syntax into a require statement, or stringify the given content
converts the image path in the markdowned-image syntax into a require statement, or stringify the given content
converts the image path in the markdowned - image syntax into a require statement or stringify the given content
function requirifyImageReference(markdownImageReference) {
  const [, mdImageStart, mdImagePath, optionalMdTitle, mdImageEnd ] = imagePathRE.exec(markdownImageReference) || []
  if (!mdImagePath) {
    return JSON.stringify(markdownImageReference)
  } else {
    const imageRequest = loaderUtils.stringifyRequest(
      this,
      loaderUtils.urlToRequest(mdImagePath)
    )
    const mdImageTitleAndEnd = optionalMdTitle ? JSON.stringify(optionalMdTitle + mdImageEnd) : JSON.stringify(mdImageEnd)
    return `${JSON.stringify(mdImageStart)} + require(${imageRequest}) + ${mdImageTitleAndEnd}`
  }
}
function requirifyImageReference ( markdownImageReference ) { const [ , mdImageStart , mdImagePath , optionalMdTitle , mdImageEnd ] = imagePathRE . exec ( markdownImageReference ) || [ ] if ( ! mdImagePath ) { return JSON . stringify ( markdownImageReference ) } else { const imageRequest = loaderUtils . stringifyRequest ( this , loaderUtils . urlToRequest ( mdImagePath ) ) const mdImageTitleAndEnd = optionalMdTitle ? JSON . stringify ( optionalMdTitle + mdImageEnd ) : JSON . stringify ( mdImageEnd ) return ` ${ JSON . stringify ( mdImageStart ) } ${ imageRequest } ${ mdImageTitleAndEnd } ` } }
converts the image path in the markdowned-image syntax into a require statement, or stringify the given content
converts the image path in the markdowned - image syntax into a require statement or stringify the given content