text: "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  const path_1 = require("path");
  const fs_extra_1 = require("fs-extra");
  const mimeTypes = {
      '.jpg': 'image/jpeg',
      '.jpeg': 'image/jpeg',
      '.png': 'image/png',
      '.gif': 'image/gif',
  };
  function resourceImports(options = {}) {
      return {
          name: 'resourceImports',
          load(id) {
              const mime = mimeTypes[path_1.extname(id)];
              if (!mime)
                  return null;
              return fs_extra_1.readFile(id).then((file) => `export default "data:${mime};base64,${Buffer.from(file).toString('base64')}";`);
          },
      };
  }
  exports.default = resourceImports;
  