telamonian пре 6 година
родитељ
комит
d8ea0e5968
3 измењених фајлова са 7 додато и 21 уклоњено
  1. 0 1
      dev_mode/package.json
  2. 1 8
      dev_mode/webpack.config.js
  3. 6 12
      jupyterlab/staging/webpack.config.js

+ 0 - 1
dev_mode/package.json

@@ -72,7 +72,6 @@
     "sort-package-json": "~1.22.1",
     "source-map-loader": "~0.2.1",
     "style-loader": "~0.23.1",
-    "svg-react-loader": "~0.4.6",
     "svg-url-loader": "~2.3.2",
     "svgo": "~1.2.1",
     "svgo-loader": "~2.2.0",

+ 1 - 8
dev_mode/webpack.config.js

@@ -197,20 +197,13 @@ module.exports = [
             options: { encoding: 'none', limit: 10000 }
           }
         },
-        // {
-        //   // in react files, svg is loaded as a react component
-        //   test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
-        //   issuer: { test: /\.jsx$/ },
-        //   use: 'svg-react-loader'
-        // }
         {
           // in ts and tsx files (both of which compile to js),
-          // svg is loaded as a url formatted string
+          // svg is loaded as a raw string
           test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
           issuer: { test: /\.js$/ },
           use: {
             loader: 'raw-loader'
-            // options: { encoding: 'none', limit: 10000 }
           }
         }
       ]

+ 6 - 12
jupyterlab/staging/webpack.config.js

@@ -198,20 +198,14 @@ module.exports = [
           }
         },
         {
-          // in react files, svg is loaded as a react component
+          // in ts and tsx files (both of which compile to js),
+          // svg is loaded as a raw string
           test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
-          issuer: { test: /\.jsx$/ },
-          use: 'svg-react-loader'
+          issuer: { test: /\.js$/ },
+          use: {
+            loader: 'raw-loader'
+          }
         }
-        // {
-        //   // in css files, svg is loaded as a url formatted string
-        //   test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
-        //   issuer: { test: /\.js$/ },
-        //   use: {
-        //     loader: 'svg-url-loader',
-        //     options: { encoding: 'none', limit: 10000 }
-        //   }
-        // }
       ]
     },
     watchOptions: {