react-to-pdf package throwing "Module parse failed: Unexpected token (49:38) You may need an appropriate loader to handle this file type..."

85 views Asked by At

I'm using react-to-pdf to generate pdf from react components. It working well when tried in codesandbox but it throwing following error when working in my local.

I'm using React(v18.0.0), Webpack(v4.43.0) and Babel Core(v7.9.6)

0

There are 0 answers