next-assets-manifest

0.3.0 • Public • Published

Next Assets Manifest

Build Status codecov dependencies Status devDependencies Status

Add webpack-assets-manifest to your Next.js project.

npm install next-assets-manifest --save-dev

Requirements

Example Usage

View examples.

assetsManifest, assetsManifestClient, and assetsManifestServer are optional.

The values for these options can be found here.

Add something like this to your next.config.js.

const withAssetsManifest = require('next-assets-manifest');

module.exports = withAssetsManifest({
  // These options are used for both client and server manifest plugins.
  assetsManifest: {
    done(manifest) {
      console.log(`${manifest}`);

      // You can get the options Next.js uses, if you need it for anything.
      console.log(manifest.options.extra.nextOptions);
    },
  },
  // Customize the client side manifest.
  assetsManifestClient: {
    output: 'client-manifest.json',
  },
  // Customize the server side manifest.
  assetsManifestServer: {
    output: 'server-manifest.json',
  },
});

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.3.0
    1,243
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.3.0
    1,243
  • 0.2.0
    0
  • 0.1.0
    0

Package Sidebar

Install

npm i next-assets-manifest

Weekly Downloads

1,243

Version

0.3.0

License

MIT

Unpacked Size

4.99 kB

Total Files

4

Last publish

Collaborators

  • webdeveric