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
I ran into an issue with the webpack build failing. It can be fixed by setting the "presets" option for babel-loader to react in the webpack.config.js file.
The issue is probably a nuance to my environment, although there is some background here and here. The preferred solution is to probably use a .babelrc config file as described here.
Original webpack.config.js file,
Adding a "preset" option for babel-loader in the module.rules array solves the issue (although see the link above regarding the .babelrc config file solution),
The text was updated successfully, but these errors were encountered:
The code actually does have a .babelrc config file, as discussed in the book under Chapter 2: Preparing the Development Environment -> Checking your development setup -> Configuring Babel, Webpack, and Nodemon.
But I just saw that the .babelrc file is missing in the PacktPublishing/Full-Stack-React-Projects code repository. Thank you for pointing this out.
Thank you for following up so quickly. I had cloned the Packt repository. Build works perfectly after reverting the webpack.config.js file and added the .babelrc found here.
I ran into an issue with the webpack build failing. It can be fixed by setting the "presets" option for
babel-loader
toreact
in the webpack.config.js file.The issue is probably a nuance to my environment, although there is some background here and here. The preferred solution is to probably use a .babelrc config file as described here.
Original webpack.config.js file,
Adding a "preset" option for
babel-loader
in themodule.rules
array solves the issue (although see the link above regarding the .babelrc config file solution),The text was updated successfully, but these errors were encountered: