Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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 中

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc