Symlink Import Error in React "Module parse failed: Unexpected token"

20 Views Asked by At

I am working on two different react/.net core project, and need a component shared between these two projects. i am creating a symlink using "mklink /D" in windows.

react version : 18.2.0

symlink is created successfully but when i am trying to import my project i am facing the following error.

ERROR in ../../common-library/src/Sample.jsx 7:8
Module parse failed: Unexpected token (7:8)
File was processed with these loaders:
 * ./node_modules/@pmmmwh/react-refresh-webpack-plugin/loader/index.js
 * ./node_modules/source-map-loader/dist/cjs.js
You may need an additional loader to handle the result of these loaders.
| function Sample(){
|
> return (<><h4>Hello From Library</h4></>);
|
| }
0

There are 0 best solutions below