Module parse failed: Unexpected token - npm-pdfreader #17029
-
Hi everyone, when importing
I am getting the following error:
And this is the index.js file where the error occured:
This is webpack.config.js:
My project includes:
Can someone help me and guide me how to properly setup webpack in order to use plugin like npm-pdfreader and get rid of the mentioned error? Thank you very much for your help and guidance. UPDATE: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
You need to use webpack v5 to handle new syntax |
Beta Was this translation helpful? Give feedback.
-
Same issue. I use webpack 5.91.0, webpack-cli 5.1.4 |
Beta Was this translation helpful? Give feedback.
No workarounds, only webpack v5, webpack v4 is deprecated and only security fixes