智能照明系统APP-本地串口
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
LightingSystemApp-serial/.svn/pristine/6a/6a80a67be434ec6b35764b4f3f9...

25 lines
734 B

const HtmlWebpackPlugin = require('html-webpack-plugin')
class WebpackHtmlAppendPlugin {
constructor (content) {
this.content = content || ''
}
apply (compiler) {
compiler.hooks.compilation.tap('WebpackHtmlAppendPlugin', (compilation) => {
let beforeEmit = compilation.hooks.htmlWebpackPluginAfterHtmlProcessing
if (!beforeEmit && HtmlWebpackPlugin.getHooks) {
const hooks = HtmlWebpackPlugin.getHooks(compilation)
if (hooks) {
beforeEmit = hooks.beforeEmit
}
}
beforeEmit && beforeEmit.tapAsync('WebpackHtmlAppendPlugin', (data, cb) => {
data.html += this.content
cb(null, data)
})
})
}
}
module.exports = WebpackHtmlAppendPlugin