You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
minor #10667 Update Package name of React Preset for Babel (andrecadete)
This PR was submitted for the master branch but it was merged into the 4.1 branch instead (closes#10667).
Discussion
----------
Update Package name of React Preset for Babel
Seems the React Preset for Babel has been renamed and the previous package discontinued (at least that's my interpretation seeing v7+ only available in the new one).
Ran into this issue by simply following this guide and getting:
```
root@afb35030f337:/var/www/code# yarn encore dev
yarn run v1.10.1
warning package.json: No license field
$ /var/www/code/node_modules/.bin/encore dev
Running webpack ...
Error: Install @babel/preset-react to use enableReactPreset()
yarn add @babel/preset-react@^7.0.0 --dev
```
After swapping dependencies ("babel-preset-react" to "@babel/preset-react"), it works as expected:
```
root@afb35030f337:/var/www/code# yarn encore dev
yarn run v1.10.1
warning package.json: No license field
$ /var/www/code/node_modules/.bin/encore dev
Running webpack ...
DONE Compiled successfully in 518ms
```
No code examples shared since you literally just need to follow the "Installing Encore" guide (with or without Flex) and then this "Enabling React.js" guide to run into the issue.
<!--
If your pull request fixes a BUG, use the oldest maintained branch that contains
the bug (see https://symfony.com/roadmap for the list of maintained branches).
If your pull request documents a NEW FEATURE, use the same Symfony branch where
the feature was introduced (and `master` for features of unreleased versions).
-->
Commits
-------
cba52cc Update Package name of React Preset for Babel
0 commit comments