0.1.1 • Published 5 years ago

next-html v0.1.1

Weekly downloads
84
License
MIT
Repository
github
Last release
5 years ago

Next.js + Html

Import html files in Next.js

Installation

npm install --save next-html

or

yarn add next-html

Usage

Create a next.config.js in your project

// next.config.js
const withHtml = require('next-html');
module.exports = withHtml();

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

// next.config.js
const withHtml = require('next-html');
module.exports = withHtml({
  webpack(config, options) {
    return config;
  }
});

assetPrefix

You can serve remote resources by setting assetPrefix option.

Example usage:

// next.config.js
const withHtml = require('next-html');
module.exports = withHtml({
  assetPrefix: 'https://static-example.com',
  webpack(config, options) {
    return config;
  }
});