How to use webpack-plugin-ramdisk - 1 common examples

To help you get started, we’ve selected a few webpack-plugin-ramdisk examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github shellscape / webpack-plugin-serve / lib / plugins / ramdisk.js View on Github external
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);
  }
};

webpack-plugin-ramdisk

🐏 A webpack plugin for blazing fast builds on a RAM disk / drive

MPL-2.0
Latest version published 3 years ago

Package Health Score

53 / 100
Full package analysis

Popular webpack-plugin-ramdisk functions