Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
inline-jscss-webpack-plugin
Advanced tools
基于 webpack
和 html-webpack-plugin
的插件,将 js
|css
链接对应内容打入 html
npm install --save-dev inline-jscss-webpack-plugin
// 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
参数名称 | 类型 | 含义 | 是否必填 | 默认值 |
---|---|---|---|---|
assets | Array[string] | 要打入 html 中的所有 js&css 文件 | 否 | [] |
delete | Boolean | 是否删除已经打入的文件 | 否 | false |
FAQs
将 webpack 打包之后的静态文件内联到 html 中
We found that inline-jscss-webpack-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.