rax
rax copied to clipboard
feat: support customize styles and scripts
比如在我们的使用场景中
- 需要给资源追加一些参数 ?xxx=yyy
- 改写 script 的执行逻辑,不会立马执行,等收到客户端消息再去执行主脚本
- 使用
<link rel="preload">等其他标签处理 styles/scripts
该 PR 支持了自定义 styles 和 scripts 处理逻辑,用法如下
import { Style, Script } from 'rax-document'
// for customize styles
<Style>
{
styles => {
// do something with styles
}
}
</Style>
// for customize scripts
<Script>
{
scripts => {
// do something with scripts
}
}
</Script>
更新下版本和 changelog
更新下版本和 changelog
done