Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (!pkg.name) {
// use md5 for a short hash that'll be consistent between wps starts
const md5 = crypto.createHash('md5');
md5.update(path);
pkg.name = md5.digest('hex');
}
const newPath = join(pkg.name, lastSegment);
// clean up the output path in prep for the ramdisk plugin
compiler.options.output.path = newPath;
this.log.info(`Ramdisk enabled`);
const plugin = new WebpackPluginRamdisk({ name: 'wps' });
plugin.apply(compiler);
rm.sync(path);
symlinkSync(compiler.options.output.path, path);
}
};