1.11.1 • Published 5 years ago
@constgen/neutrino-html-noscript v1.11.1
@constgen/neutrino-html-noscript
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-noscriptUsage
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()
]
}