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(
      options.inputFS,
      path.join(options.rootDir, 'index.html'),
      ['.htmlnanorc', '.htmlnanorc.js'],
    );

    const htmlNanoConfig = {
      minifyJs: false,
      ...userConfig?.config,
    };

    return {
      contents: (await posthtml([htmlnano(htmlNanoConfig)]).process(contents))
        .html,
    };
  },
});

htmlnano

Modular HTML minifier, built on top of the PostHTML

MIT
Latest version published 6 months ago

Package Health Score

79 / 100
Full package analysis

Popular htmlnano functions