Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

inline-jscss-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inline-jscss-webpack-plugin

将 webpack 打包之后的静态文件内联到 html 中

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

inline-jscss-webpack-plugin

基于 webpackhtml-webpack-plugin 的插件,将 js|css 链接对应内容打入 html

Installation

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

Usage

  // webpack.conf.js

  const HtmlWebpackPlugin = require('html-webpack-plugin')
  const InlineJscssWebpackPlugin = require('inline-jscss-webpack-plugin')

  const webpackConfig = {
    entry: {
      example: './example.js'
    },
    plugins: [
      new HtmlWebpackPlugin(),
      new InlineJscssWebpackPlugin({
        assets: [
          'manifest.js', // 会打入 manifest.[hash.]js
          'example' // 会打入 example.[hash.]js 和 example.[hash.]css
        ]
      })
    ]
  }

  module.exports = webpackConfig

options

参数名称类型含义是否必填默认值
assetsArray[string]要打入 html 中的所有 js&css 文件[]
deleteBoolean是否删除已经打入的文件false

Keywords

webpack

FAQs

Package last updated on 02 Sep 2019

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