Przeglądaj źródła

Transpile PDF.js v4 with Babel (#19846)

GitOrigin-RevId: 1338dbae0683d72ab84ee58d1128d22754d14567
Alf Eaton 2 lat temu
rodzic
commit
654090b1b3
2 zmienionych plików z 5 dodań i 1 usunięć
  1. 1 0
      services/web/babel.config.json
  2. 4 1
      services/web/webpack.config.js

+ 1 - 0
services/web/babel.config.json

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

+ 4 - 1
services/web/webpack.config.js

@@ -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',