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

Babel config #77

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Chrome extensions
- Check the `Developer Mode` button to enable it.
- Click on the `Load Unpacked Extension…` button.
- Select your extension’s extracted directory.
- Exception is when you don't have standard RCA (`npx create-react-app your-app`) => see lowcode/babel-config.md

3. Start [FS over HTTP](https://github.com/iteria-ui/lowcode/tree/master/packages/fs-over-http) (used for saving modified source code)

Expand Down
17 changes: 17 additions & 0 deletions babel-config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## Babel configuration

If your react project is not classic CRA (Create React App) make sure to add "@babel/plugin-transform-react-jsx-source to the project":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, be more preceise and explain if there is babel.config.js in your project make sure that @babel/plugin-transform-react-jsx-source is installed and configured because there are other tools simmilar to CRA (like next.js, snowpack ...)


`npm install --save-dev @babel/plugin-transform-react-jsx-source`

or

`npm install --save-dev @babel/plugin-transform-react-jsx-source`


Then you need to add this dependency to `babel.config.js` => module.exports => plugins

Like this:

![](/packages/browser-extension/.media/.github/babel.png)

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.