@constgen/neutrino-html-noscript

1.11.1 • Public • Published

@constgen/neutrino-html-noscript

npm npm

Neutrino middleware that adds <noscript> tag with a message as the very first child of <body>

Requirements

  • Node.js v10+
  • Neutrino v9
  • Webpack v4
  • HtmlWebpackPlugin v4.5.1+

Installation

@constgen/neutrino-html-noscript can be installed from NPM. You should install it to "dependencies" (--save) or "devDependncies" (--save-dev) depending on your goal.

npm install --save @constgen/neutrino-html-noscript

Usage

In preset

Require this package and plug it into Neutrino. The following shows how you can pass an options object to the middleware, showing the defaults:

let noscript = require('@constgen/neutrino-html-noscript')

neutrino.use(noscript(
   'We’re sorry but our app doesn’t work properly without JavaScript enabled. Please enable it to continue.'
))

In neutrinorc

The middleware also may be used together with another presets in Neutrino rc-file, e.g.:

.neutrinorc.js

let noscript = require('@constgen/neutrino-html-noscript')

module.exports = {
   use: [
      noscript()
   ]
}

Package Sidebar

Install

npm i @constgen/neutrino-html-noscript

Weekly Downloads

0

Version

1.11.1

License

GPL-3.0

Unpacked Size

37.9 kB

Total Files

4

Last publish

Collaborators

  • constgen