React Babel Loader - You May Need An Appropriate Loader To Handle This File Type
The time to compile with webpack this error is triggered : you may need an appropriate loader to handle this file type. I use this libraries: This is my project files: package.j
Solution 1:
Your test expression is wrong,it has extra spaces in /\.(js | jsx)?$/
Use
test: /\.jsx?$/,
or
test: /\.(js|jsx)$/,
Apart from this you will need to change the name of your React Component to begin with Uppercase character. See this answer React - Adding component after AJAX to view
importReactfrom"react";
importReactDOM from"react-dom";
classLayoutextendsReact.Component{
render(){
return (
<h1>Hola Mundo</h1>
);
}
}
const app = document.getElementById('app');
ReactDOM.render(<Layout/>, app);
Post a Comment for "React Babel Loader - You May Need An Appropriate Loader To Handle This File Type"