🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

next-html

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

next-html

Import html in Next.js

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

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

FAQs

Package last updated on 17 Dec 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts