surma / rollup-plugin-entrypoint-hashmanifest

A rollup plugin that generates a hash manifest for each entry point.
Apache License 2.0
13 stars 5 forks source link

rollup-plugin-entrypoint-hashmanifest

A rollup plugin that generates a hash manifest for each entrypoint file you give. The manifest is compatible with the one emitted by hashmark and can be processed by tools like injectassets (née replaceinfiles).

$ npm install --save rollup-plugin-entrypoint-hashmanifest

Usage

// rollup.config.js
import entrypointHashmanifest from "rollup-plugin-entrypoint-hashmanifest";

export default {
  input: ["src/main.js", "src/worker.js", "src/serviceworker.js"],
  output: {
    dir: "dist",
    format: "amd",
    entryFileNames: "[name]-[hash].js",
    chunkFileNames: "[name]-[hash].js"
  },
  plugins: [entrypointHashmanifest()]
};

Options

{
  // ...
  plugins: [entrypointHashmanifest(options)];
}

License Apache-2.0