stringifyLoader.js 372 B

1234567891011121314
  1. "use strict";
  2. /**
  3. * The stringifyLoader turns any content into a valid JavaScript string. This allows us to load any content
  4. * with loaderContext.loadModule() without webpack complaining about non-JS modules.
  5. *
  6. * @param {string} content
  7. * @return {string}
  8. */
  9. function stringifyLoader(content) {
  10. return JSON.stringify(content);
  11. }
  12. module.exports = stringifyLoader;