0.0.1 • Published 5 years ago
babel-plugin-component-source-path v0.0.1
babel-plugin-component-source-path
实现类似微信开发者工具中审查元素时透出的组件路径,目前只支持 React 组件
Usage
如下修改 babel 配置文件比如 .bablerc。可选参数 fieldName 具体挂载的属性名称,默认 data-source
{
"plugins": [
[
"babel-plugin-component-source-path", {
"fieldName": "data-source",
}
]
]
}微信开发者工具效果:

插件实现效果:

0.0.1
5 years ago