PDF not loaded on build version Nuxt3

Which product are you using?
PDF.js Express

PDF.js Express Version

Detailed description of issue
I am using pdf.js express with my Nuxt3 application. I have installed pdf.js express with npm and copied the static files from node_modules/@pdftron/pdfjs-express/public to my Nuxt application public/lib folder. Everything was working fine when I run in the node server in browser, but when I try to run a build version of my Nuxt application I was not able to open any pdf file, showing net::ERR_ABORTED 404 (Not Found) error

Code snippet


    <div id='webviewer' ref='viewer'></div>

  export default {
    name: 'WebViewer',
    props: {
      path: String,
      url: String
    mounted: function () {
      import('@pdftron/pdfjs-express').then(() => {

              path: '../lib',
              initialDoc: this.url, // replace with your own PDF file
              licenseKey: '',
            }, this.$refs.viewer).then((instance) => {
              // call apis here

  #webviewer {
    height: 100vh;

And the error I get in my console after running the build version:

Hello Yeasir,

Thank you for contacting us.

Based off the error message, it looks like the project is not building properly.

Could you host your project on GitHub, so we can take a closer look? Also, please provide the exact steps you took to build the project.

Best Regards,