travel/admin/node_modules/svg-sprite-loader/lib/utils/generate-export.js

15 lines
341 B
JavaScript
Raw Normal View History

2024-06-24 11:28:18 +08:00
const loaderDefaults = require('../config').loader;
/**
* @param {string} content
* @param {boolean} [esModule=false]
* @return {string}
*/
function generateExport(content, esModule = loaderDefaults.esModule) {
return esModule ?
`export default ${content}` :
`module.exports = ${content}`;
}
module.exports = generateExport;