Transpile PDF.js v4 with Babel (#19846)

GitOrigin-RevId: 1338dbae0683d72ab84ee58d1128d22754d14567
This commit is contained in:
Alf Eaton 2024-08-14 11:42:18 +01:00 committed by Copybot
parent dfa8eee981
commit 654090b1b3
2 changed files with 5 additions and 1 deletions

View file

@ -1,4 +1,5 @@
{
"compact": false,
"presets": [
[
"@babel/env",

View file

@ -125,7 +125,10 @@ module.exports = {
test: /\.([jt]sx?|[cm]js)$/,
// Only compile application files and specific dependencies
// (other npm and vendored dependencies must be in ES5 already)
exclude: [/node_modules\/(?!(react-dnd|chart\.js|@uppy)\/)/, vendorDir],
exclude: [
/node_modules\/(?!(react-dnd|chart\.js|@uppy|pdfjs-dist401)\/)/,
vendorDir,
],
use: [
{
loader: 'babel-loader',