Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support customize styles and scripts #2229

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

fengzilong
Copy link
Contributor

@fengzilong fengzilong commented Aug 31, 2021

比如在我们的使用场景中

  1. 需要给资源追加一些参数 ?xxx=yyy
  2. 改写 script 的执行逻辑,不会立马执行,等收到客户端消息再去执行主脚本
  3. 使用 <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>

@SoloJiang
Copy link
Collaborator

更新下版本和 changelog

@fengzilong
Copy link
Contributor Author

更新下版本和 changelog

done

@CLAassistant
Copy link

CLAassistant commented Jan 10, 2022

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants