petehunt / webpack-howto

10.12k stars 697 forks source link

include css and js files into HTML #92

Closed krzys1u closed 7 years ago

krzys1u commented 7 years ago

i have code like this

<html>
      <head>
         <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css">
         <link href="path_to_css/some_css.css" rel="stylesheet" type="text/css">
      </head>
      <body>
       ...
      <script src="bootstrap/js/bootstrap.min.js"></script>
      <script src="jquery/jquery.min.js"></script>
   </body>
</html>

and i need plugin/loader or other way to get my html file with replaced link and script tags to content of this files, is there any way to do it ?

krzys1u commented 7 years ago

Close, i wrote own plugin for this https://www.npmjs.com/package/include-file-webpack-plugin