Skip to content

Commit 527c001

Browse files
committed
update
1 parent 17c4358 commit 527c001

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"scripts": {
77
"start": "webpack-dev-server --config ./webpack.config.js --mode development",
88
"dev": "webpack --watch --progress --colors --config webpack.config.js --mode=development",
9-
"test": "echo \"No test specified\" && exit 0"
9+
"test": "webpack --progress --colors --config webpack.config.js --mode=production"
1010
},
1111
"keywords": [],
1212
"author": "",
@@ -20,13 +20,17 @@
2020
"@babel/preset-react": "^7.0.0",
2121
"babel-loader": "^8.0.6",
2222
"copy-webpack-plugin": "^5.0.4",
23+
"file-loader": "^4.2.0",
24+
"image-webpack-loader": "^5.0.0",
2325
"react-hot-loader": "^4.12.10",
2426
"webpack": "^4.39.1",
2527
"webpack-cli": "^3.3.6",
2628
"webpack-dev-server": "^3.7.2"
2729
},
2830
"dependencies": {
2931
"@babel/polyfill": "^7.4.4",
32+
"@material-ui/core": "^4.3.3",
33+
"@material-ui/icons": "^4.2.1",
3034
"react": "^16.8.6",
3135
"react-dom": "^16.8.6"
3236
}

webpack.config.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,19 @@ module.exports = {
1414
test: /\.(js|jsx)$/,
1515
exclude: /node_modules/,
1616
use: ['babel-loader']
17+
},
18+
{
19+
test: /\.(gif|png|jpe?g|svg)$/i,
20+
use: [
21+
'file-loader',
22+
{
23+
loader: 'image-webpack-loader',
24+
options: {
25+
bypassOnDebug: true, // webpack@1.x
26+
disable: true, // webpack@2.x and newer
27+
},
28+
},
29+
]
1730
}
1831
]
1932
},

0 commit comments

Comments
 (0)