mirror of
https://github.com/grafana/grafana.git
synced 2025-07-28 16:52:12 +08:00
7 lines
289 B
JavaScript
7 lines
289 B
JavaScript
const loaderUtils = require('loader-utils');
|
|
|
|
module.exports = function blobUrl(source) {
|
|
const { type } = loaderUtils.getOptions(this) || {};
|
|
return `module.exports = URL.createObjectURL(new Blob([${JSON.stringify(source)}]${type ? `, { type: ${JSON.stringify(type)} }` : ''}));`;
|
|
};
|