Closed Bnaimy closed 4 years ago
@Bnaimy Thank you for using and like it. Can you provide the babel configuration, code, error logs? Provide screenshots is better.
this is file .babelrc inside package.json
{ "name": "app", "version": "1.0.0", "babel": { "presets": [ ], "plugins": ["react-directives"], "options": { "prefix": "x", "pragmaType": "React" } }
@Bnaimy Your babel configuration looks like this:
{
"name": "app",
"version": "1.0.0",
"babel": {
"presets": [],
"plugins": [
"react-directives"
],
"options": {
"prefix": "x",
"pragmaType": "React"
}
}
}
It is invalid, correct configuration:
{
"name": "app",
"version": "1.0.0",
"babel": {
"presets": [],
"plugins": [
[
"react-directives",
{
"prefix": "x",
"pragmaType": "React"
}
]
]
}
}
You can learn more at https://babeljs.io/docs/en/plugins#plugin-options, and optimize the documentation later.
And the option prefix
= "x", pragmaType
= "React" is the default option, you can omit the options section as follows:
{
"name": "app",
"version": "1.0.0",
"babel": {
"presets": [],
"plugins": [
"react-directives"
]
}
}
it's work thanks and waiting for features good jobs
hi I am really like this project because is very difficult to write code without directive I really I don't know why is not working , just if you can init a project with configuration of your project ??