// A loader that replaces a placeholder with a specific value.
// Accepts options: { search: string, replace: string }
module.exports = function replaceLoader(source) {
const options = this.getOptions ? this.getOptions() : {}
const search = options.search || 'PLACEHOLDER'
const replace = options.replace || 'REPLACED'
return source.replaceAll(search, replace)
}