Skip to content

ERROR Unexpected token '{' ERROR Loading chunk vendors-node_modules_pdfjs-dist_build_pdf_mjs failed. #20079

Closed
@21071988

Description

@21071988

Attach (recommended) or Link to PDF file

app crashes if using package in safari

Image

Web browser and its version

safari v16

Operating system and its version

macos

PDF.js version

5.3.93"

Is the bug present in the latest PDF.js version?

Yes

Is a browser extension

No

Steps to reproduce the problem

import in file:
import * as PDFJS from 'pdfjs-dist'
import * as PdfWorker from 'pdfjs-dist/legacy/build/pdf.worker.mjs'

webpack:
{
test: /.js$/,
exclude: [
/node_modules/(?!(@tiptap|)/).*/,
/.test.js$/,
'/test/',
'/public/'
],
use: {
loader: 'babel-loader'
}
}

babel-loader v9

What is the expected behavior?

app working as it should as it does in all other browsers

What went wrong?

it crashes

Link to a viewer

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions