Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
(match, code) => {
const hash = `${utils.getFileHash(filepath)}_${++index}`;
const filename = `${hash}.css`;
virtualModules.writeModule(
path.resolve(cacheDirectory, filename),
code
.replace(/\\"/g, '"')
.replace(/\\'/g, "'")
.replace(/\\n/g, '\n'),
);
return `require('.cache/reshadow/${filename}')`;
},
)