0.0.1 • Published 5 years ago

@hashicorp/next-prebuild v0.0.1

Weekly downloads
1
License
MPL-2.0
Repository
github
Last release
5 years ago

Next.js + Prebuild Webpack Plugin

Use Prebuild Webpack Plugin with Next.js

Installation

npm install --save @hashicorp/next-prebuild

or

yarn add @hashicorp/next-prebuild

Usage

Create a next.config.js in your project

// next.config.js
const withPrebuild = require("@hashicorp/next-prebuild");
module.exports = withPrebuild({
  /* options */
})();

All prebuild options are documented here

Optionally you can add your custom Next.js configuration as parameter

// next.config.js
const withPrebuild = require("@hashicorp/next-prebuild");
module.exports = withPrebuild()({
  webpack(config, options) {
    return config;
  }
});