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

提供获取和修改template AST的途径 #217

Open
xuchaoying opened this issue Jul 12, 2018 · 0 comments
Open

提供获取和修改template AST的途径 #217

xuchaoying opened this issue Jul 12, 2018 · 0 comments

Comments

@xuchaoying
Copy link

Proposal

想实现一个regular-css-modules,需要取到组件经过parse后的template AST,对所有class属性内容进行字符串替换。

Expected API

Component.prototype.afterParseTemplate = (ast) => {
    // do some changes to ast
    ....

    return newast;
}

在生成template AST后提供一个生命周期函数

References

react-css-modules

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

No branches or pull requests

2 participants