Browse Source

added webpack handling of images file type

Skylsmoi 7 years ago
parent
commit
28d582fd73
2 changed files with 7 additions and 0 deletions
  1. 1 0
      package.json
  2. 6 0
      webpack.config.js

+ 1 - 0
package.json View File

@@ -21,6 +21,7 @@
21 21
     "babel-preset-env": "^1.6.1",
22 22
     "babel-preset-react": "^6.24.1",
23 23
     "css-loader": "^0.28.7",
24
+    "file-loader": "^1.1.5",
24 25
     "prop-types": "^15.6.0",
25 26
     "react": "^16.0.0",
26 27
     "react-dom": "^16.0.0",

+ 6 - 0
webpack.config.js View File

@@ -66,6 +66,12 @@ module.exports = {
66 66
     }, {
67 67
       test: /\.styl$/,
68 68
       use: ['style-loader', 'css-loader', 'stylus-loader']
69
+    }, {
70
+      test: /\.(jpg|png|svg)$/,
71
+      use: ['url-loader'],
72
+      options: {
73
+        limit: 25000
74
+      }
69 75
     }]
70 76
   },
71 77
   resolve: {