New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

inline-assets-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inline-assets-webpack-plugin

split assets by webpack stats

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

inline-assets-webpack-plugin

A webpack Plugin. Extract asset chunks, usually used in css separation processing for single-page applications. Output asset chunks on html via html-webpack-plugin.

react-asyncmodule-tool's importcss relay on the plugin.

Installation

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

webpack.config.js

const HtmlWebpackPlugin = require('html-webpack-plugin');
const AssetsChunkPlugin = require('inline-assets-webpack-plugin');

module.exports = {
    ...
    plugins: [
        new HtmlWebpackPlugin(),
        new AssetsChunkPlugin(options)
    ]
};

html inline code like this

<script type="text/javascript">
window.__ASSETS_CHUNKS__ = {
    "app":"/dist/app.49a9342d.css"
}
</script>

Options

name

default 'webpackInlineAssetsChunks'.

Mounted on the htmlWebpackPlugin.files object, the corresponding script block can be generated in the html template using {{{htmlWebpackPlugin.files.webpackInlineAssetsChunks}}}}.

Used in webpack v4-.

inject

'head | body'. The location of the generated script block, Used in webpack v4.

output

Directory filename for assetchunks. Such aspath.resolve(__dirname, './build/assets.json').The generated files are used in the production server side.

Keywords

assets

FAQs

Package last updated on 10 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts