
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
include-html-loader
Advanced tools
npm install include-html-loader
本插件仅用于在html文档中插入其它的html文档,实现子模板的功能,在引入子模板同时,可以设置变量传入子模板,实现子模板可配置功能。
${require("../layout/sub.html")}
${require("../layout/sub.html",{"title": "this is title"})}
#{title}
module.exports = {
entry: "bundle.js",
output: {
path: "dist"
},
module: {
loaders: [
{
test: /\.html$/,
loader: "include-html",
query: {
root: "./src" // 请一定配置这里,是子模板相对在项目中的相对目录
}
}
]
}
}
parent.html
<!DocType html>
<html>
<head>
<title>this is parent html</title>
</head>
<body>
${require("./sub-1.html",{"title": "this is sub title"})}
</body>
</html>
sub-1.html
#{title}, hello, world!
parent.html
<!DocType html>
<html>
<head>
<title>this is parent html</title>
</head>
<body>
this is sub title, hello, world!
</body>
</html>
FAQs
include html file into html for webpack loader
We found that include-html-loader 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
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.