next-html

0.1.1 • Public • Published

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;
  }
});

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i next-html

    Weekly Downloads

    159

    Version

    0.1.1

    License

    MIT

    Unpacked Size

    10.1 kB

    Total Files

    5

    Last publish

    Collaborators

    • willico
    • alicanerdurmaz
    • omerfarukaplak
    • pankodbot
    • aliemirsen