Skip to content

An extension plugin for the webpack plugin html-webpack-plugin.It allows you to embed javascript and css source inline.

Notifications You must be signed in to change notification settings

Tiquiero/assets-inline-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

An extension for the html-webpack-plugin

NPM

This is an extension plugin for the webpack plugin html-webpack-plugin. It allows you to embed javascript and css source assets inline.

Language

中文

Installation

Install the plugin with npm:

$ npm install --save-dev assets-inline-plugin

Basic Usage

Require the plugin in your webpack config:

const HtmlInlinePlugin = require('assets-inline-plugin');

Add the plugin to your webpack config as follows:

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

Options

The available options are:

  • inline: boolean or regexp or object

    Determines how to inline asserts. The following option are all vaild.

    • inline: true
    • inline: /\.(css|js)$/
    • inline: { css: /\.css$/, js: /\.js$/ }
    • inline: { css: true, js: true }

    Default is true.

  • remove: boolean

    Removes the inlined files. Default is true.

About

An extension plugin for the webpack plugin html-webpack-plugin.It allows you to embed javascript and css source inline.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published