Skip to content

milcktoast/html-webpack-inline-plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

html-webpack-inline-plugin

NPM Version

Inline all <script>, <link> and <img> tags that contain the inline attribute with inline-source.

Installation

npm install --save-dev html-webpack-inline-plugin

Basic Usage

Require the plugin in your webpack config:

var HtmlWebpackInlinePlugin = require('html-webpack-inline-plugin');

Add the plugin to your webpack config as follows:

plugins: [
  new HtmlWebpackPlugin(),
  new HtmlWebpackInlinePlugin()
]  

Add the tag to your html template as follows:

<!DOCTYPE html>
<html>
  <head>
    <script inline src="web_modules/lib/lib.js"></script>
  </head>
  <body>
  </body>
</html>

Inspired by

gulp-inline-source

License

This project is licensed under MIT.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%