xslt-insert-html-webpack-plugin
v1.0.2
Published
A Webpack plugin to insert html tag in head
Downloads
50
Maintainers
Readme
xslt-insert-html-webpack-plugin
A Webpack plugin to insert html tag in head
Getting Started
Install the plugin:
npm i -D xslt-insert-html-webpack-plugin
Examples
var xslData = {
template: path.join(__dirname, '/xslt/jats2html.xsl'), //输入的xsl文件
filename: 'jats2html.xsl', // 输出的xsl文件及路径
path: 'xslt',
data: { // 要创建节点的参数
link: {
href: "../css/journal-web.css",
rel: "stylesheet",
type: "text/css"
},
script: {
src: "../js/journal-web.js",
type: "text/javascript"
}
}
}
var XsltInsertHtmlWebpackPlugin = require('xslt-insert-html-webpack-plugin');
var path = require('path');
module.exports = {
context: path.join(__dirname, 'app'),
plugins: [
new XsltInsertHtmlWebpackPlugin({
file: xslData
}),
]
}