How to use htmlnano - 1 common examples

To help you get started, we’ve selected a few htmlnano examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github parcel-bundler / parcel / packages / optimizers / htmlnano / src / HTMLNanoOptimizer.js View on Github external

    let userConfig = await loadConfig(
      path.join(options.rootDir, 'index.html'),
      ['.htmlnanorc', '.htmlnanorc.js'],

    const htmlNanoConfig = {
      minifyJs: false,

    return {
      contents: (await posthtml([htmlnano(htmlNanoConfig)]).process(contents))


Modular HTML minifier, built on top of the PostHTML

Latest version published 6 months ago

Package Health Score

83 / 100
Full package analysis

Popular htmlnano functions