Skip to content

hajjiTarik/webpack-fullhtml-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Simplifies creation of HTML files with all custom input

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published