Transpile PDF.js v4 with Babel (#19846)

GitOrigin-RevId: 1338dbae0683d72ab84ee58d1128d22754d14567
This commit is contained in:
Alf Eaton
2024-08-15 08:05:06 +00:00
committed by Copybot
parent dfa8eee981
commit 654090b1b3
2 changed files with 5 additions and 1 deletions
+1
View File
@@ -1,4 +1,5 @@
{
"compact": false,
"presets": [
[
"@babel/env",
+4 -1
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',