0.1.5 • Published 4 years ago

insert-html-loader v0.1.5

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

insert-html-loader

在xhtml文件的指定处插入代码。

downloads install size Version License

如何调试?

首先进入example例子项目,运行:

npm run debug

在需要调试的地方提前添加“ debugger ”语句,这和普通的web端调试一样,接着,在chrome浏览器地址栏中输入:

chrome://inspect/#devices

接着,请点击“ Open dedicated DevTools for Node ”后进入调试界面。

如何使用?

首先需要安装

npm install --save-dev insert-html-loader

接着在webpack.config.js中配置

loader: 'insert-html-loader',
    options: {
       // 调用插入钩子标签名称
       hook: "insert-html"
    }

在需要插入html-template的地方定义插槽,可以有任意多个

<insert-html>./XXX.html</insert-html>

当然,后缀不一定需要是.html,理论上,任意的后缀都可以,并且在非生产模式下是热更新的。

开源协议

MIT

Copyright (c) 2019-2020 走一步 再走一步

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago