https://github.com/webdeveric/next-assets-manifest
Add webpack-assets-manifest to your Next.js project.
https://github.com/webdeveric/next-assets-manifest
next-plugin next-plugins webpack-assets-manifest
Last synced: 8 days ago
JSON representation
Add webpack-assets-manifest to your Next.js project.
- Host: GitHub
- URL: https://github.com/webdeveric/next-assets-manifest
- Owner: webdeveric
- Created: 2019-02-21T22:42:01.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-03-07T14:38:14.000Z (about 1 year ago)
- Last Synced: 2025-04-08T00:43:14.899Z (about 1 month ago)
- Topics: next-plugin, next-plugins, webpack-assets-manifest
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/next-assets-manifest
- Size: 850 KB
- Stars: 9
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Next Assets Manifest
[](https://codecov.io/gh/webdeveric/next-assets-manifest)
Add [webpack-assets-manifest](https://github.com/webdeveric/webpack-assets-manifest) to your [Next.js](https://nextjs.org/) project.
```shell
npm install next-assets-manifest --save-dev
```## Requirements
- [Next.js](https://nextjs.org/) 12
- Node 12+## Example Usage
View [examples](./examples/).
`assetsManifest`, `assetsManifestClient`, and `assetsManifestServer` are optional.
The values for these options can be found [here](https://github.com/webdeveric/webpack-assets-manifest#options-read-the-schema).
Add something like this to your `next.config.js`.
```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',
},
});
```