I am trying to use react-loadable with two repos / two different application made by create-react-app
I have used npm link to connect the two application and in the parent application I have used the child application using the below code
//parent application
import Loadable from 'react-loadable';
export default Loadable({
loader: () => import("child-app/src"),
loading() {
return <div>Loading...</div>
}
})
I have made child component exportable and the code is,
//child application
import React from 'react';
function App() {
return (
<div>Child App</div>
);
}
export default App;
I keep getting below error
SyntaxError: /Users/ssinha/Documents/microfrontend2/first-app/src/App.js: Unexpected token (5:4)
3 | function App() {
4 | return (
> 5 | <div>Child App</div>
| ^
6 | );
7 | }
looks like its not getting transpiled, I have tried using some plugin such as "@loadable/babel-plugin" with no help .:-(