Skip to content

Commit 0f1ef13

Browse files
committed
docs: add Webpack configuration instructions and improve README clarity
1 parent cdf4b96 commit 0f1ef13

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,29 @@ A set of tools facilitating the migration of Ember components to React component
1515
ember install react-migration-toolkit
1616
```
1717

18+
## Configuration
19+
20+
⚠️ When using Webpack, your Ember apps need to compile jsx:
21+
22+
```javascript
23+
// webpack.config.js
24+
rules: [
25+
// ...
26+
{
27+
test: /\.jsx/, // replace or add tsx if you use typescript
28+
use: {
29+
loader: 'babel-loader',
30+
options: {
31+
presets: [
32+
// Add other presets here if you need Typescript support for example
33+
['@babel/preset-react', { runtime: 'automatic' }],
34+
],
35+
},
36+
},
37+
},
38+
];
39+
```
40+
1841
## Usage
1942

2043
The main component brought by this addon is the `ReactBridge` Ember component.

0 commit comments

Comments
 (0)