Skip to content

Commit

Permalink
Merge pull request #55743 from callstack-internal/fix/55176-webpack-p…
Browse files Browse the repository at this point in the history
…df-worker-import

Fix Webpack configuration to use the minified pdf.worker file
  • Loading branch information
mountiny authored Jan 24, 2025
2 parents 921598d + 654bfb8 commit f4c3726
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/webpack/webpack.common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ const getCommonConfiguration = ({file = '.env', platform = 'web'}: Environment):
// We are importing this worker as a string by using asset/source otherwise it will default to loading via an HTTPS request later.
// This causes issues if we have gone offline before the pdfjs web worker is set up as we won't be able to load it from the server.
{
test: new RegExp('node_modules/pdfjs-dist/legacy/build/pdf.worker.mjs'),
test: new RegExp('node_modules/pdfjs-dist/legacy/build/pdf.worker.min.mjs'),
type: 'asset/source',
},

Expand Down

0 comments on commit f4c3726

Please sign in to comment.