Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
html-inline-source-webpack-plugin
Advanced tools
🔧A webpack plugin to inline source in html, wrapper of inline-source.
🔧A webpack plugin to inline source in html, wrapper of inline-source.
$ npm install html-inline-source-webpack-plugin --save-dev
// webpack.config.js
let HtmlInlineSourceWebpackPlugin = require('html-inline-source-webpack-plugin');
module.exports = {
/* Your config */
plugins : [
/* ... */
new HtmlInlineSourceWebpackPlugin(),
],
};
<!DOCTYPE html>
<html>
<head>
<title> index </title>
<link inline href="css/index.css" rel="stylesheet">
</head>
<body>
<script inline src="js/index.js" charset="utf-8"></script>
</body>
</html>
<script inline src="js/index.js" charset="utf-8"></script>
inline
attribute to inline source;src
or href
is linked to a correct file.new HtmlInlineSourceWebpackPlugin()
This option would apply to all files.
new HtmlInlineSourceWebpackPlugin({
option : {
compress : false,
rootpath : path.resolve('./dist'),
},
})
Use test
to let different option apply to different files.
new HtmlInlineSourceWebpackPlugin([
{
test : /\bindex\.html$/,
option : {
ignore : 'script',
rootpath : path.resolve('./dist'),
},
},
{
test : /\bexample\.html$/,
option : {
ignore : 'css',
rootpath : path.resolve('./dist'),
},
},
{
/* This option would apply to the rest files */
option : {
ignore : ['script', 'css'],
rootpath : path.resolve('./dist'),
},
},
])
see here.
new HtmlInlineSourceWebpackPlugin(function () {
console.log('inline source done!');
})
/* or */
new HtmlInlineSourceWebpackPlugin({
/* option */
}, function () {
console.log('inline source done!');
})
html-webpack-plugin
, only inline source in head
or body
.src
directory.src
directory.MIT
1.1.0 - Add Callback
FAQs
🔧A webpack plugin to inline source in html, wrapper of inline-source.
We found that html-inline-source-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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.