webpack-fullhtml-plugin

1.0.0 • Public • Published

webpack-fullhtml-plugin

  • Tiny plugin,
  • Simple usage
  • Full custom options

###Usage :

import FullHTMLPlugin from 'webpack-fullhtml-plugin';

new FullHTMLPlugin({
  title: `example page`,
  css: ['./reset.css', './style.css'],
  classNames: 'class-1 class-2',
  htmlNodeId: 'exemple-id',
  js:  ['./commons.js', './bundle.js'],
  filename: `./path/index.html`
}); 

###Output :

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>example page</title>
        <link rel="stylesheet" type="text/css" href="./reset.css"/>
        <link rel="stylesheet" type="text/css" href="./style.css"/>
    </head>
    <body>
        <div class="example-scene"></div>
        <script type="text/javascript" src="./commons.js"></script>
        <script type="text/javascript" src="./bundle.js"></script>
    </body>
</html>

Multiple Html output

to have more output you just need to duplicate the instantiation of the plugin

new FullHTMLPlugin(...options); 
new FullHTMLPlugin(...options); 
new FullHTMLPlugin(...options); 

Licence

MIT

Author

Hajji Tarik

Readme

Keywords

Package Sidebar

Install

npm i webpack-fullhtml-plugin

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • nouf