Przeglądaj źródła

Merge pull request #9823 from overleaf/em-webpack-shared-libs

Fix webpack reloading for shared libraries in the monorepo

GitOrigin-RevId: 498606c662a70fb6c0fc6a2f627116ea9ab28b33
Eric Mc Sween 3 lat temu
rodzic
commit
26d8c087ee
1 zmienionych plików z 3 dodań i 3 usunięć
  1. 3 3
      services/web/webpack.config.js

+ 3 - 3
services/web/webpack.config.js

@@ -59,6 +59,7 @@ const aceDir = getModuleDirectory('ace-builds')
 const pdfjsVersions = ['pdfjs-dist210', 'pdfjs-dist213']
 
 const vendorDir = path.join(__dirname, 'frontend/js/vendor')
+const librariesDir = path.resolve(__dirname, '../../libraries')
 
 module.exports = {
   // Defines the "entry point(s)" for the application - i.e. the file which
@@ -88,10 +89,10 @@ module.exports = {
     rules: [
       {
         // Pass application JS/TS files through babel-loader, compiling to ES5
-        test: /\.[j|t]sx?$/,
+        test: /\.[jt]sx?$/,
         // Only compile application files (npm and vendored dependencies are in
         // ES5 already)
-        exclude: [/node_modules\/(?!react-dnd\/)/, vendorDir],
+        exclude: [/node_modules\/(?!react-dnd\/)/, vendorDir, librariesDir],
         use: [
           {
             loader: 'babel-loader',
@@ -217,7 +218,6 @@ module.exports = {
         `frontend/js/vendor/libs/${PackageVersions.lib('fineuploader')}`
       ),
     },
-    symlinks: false,
     extensions: ['.js', '.jsx', '.ts', '.tsx', '.json'],
     fallback: {
       events: require.resolve('events'),