"Module parse failed: Unexpected character '#'" while using pdfjs-dist in Angular application

127 views Asked by At

Error message:

Error: ./node_modules/pdfjs-dist/build/pdf.js 1413:9
Module parse failed: Unexpected character '#' (1413:9)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders

I get this error on ng serve

I tried changing the versions. Currently I am using

    "@types/pdfjs-dist": "2.1.6",
    "pdfjs-dist": "2.16.105",
    "webpack": "4.30.0",
    "tslib": "^2.0.1"
0

There are 0 answers