Skip to content

Commit

Permalink
fix: url-loader
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Jul 7, 2020
1 parent 0206483 commit 3587c55
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
3 changes: 2 additions & 1 deletion core/webpack-configs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
"cross-env": "^5.2.1",
"eslint": "^6.5.1",
"file-loader": "^6.0.0",
"jest": "^24.9.0"
"jest": "^24.9.0",
"url-loader": "^4.1.0"
},
"jest": {
"testEnvironment": "node",
Expand Down
11 changes: 9 additions & 2 deletions core/webpack-configs/src/react/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,18 @@ export const react: Configuration = {
],
},
{
test: /\.(eot|md|svg|ico|jpg|jpeg|png|gif|ttf|woff|woff2|pdf)$/,
test: /\.(eot|md|svg|ico|jpg|jpeg|png|gif|ttf|woff|woff2|pdf|mp4|web|wav|mp3|m4a|aac|oga)$/,
loader: 'url-loader',
options: {
limit: 25000,
},
},
{
test: /\.(eot|md|svg|ico|jpg|jpeg|png|gif|ttf|woff|woff2|pdf|mp4|web|wav|mp3|m4a|aac|oga)$/,
use: {
loader: 'file-loader',
options: {
name: '[name].[ext]',
name: '[path][name].[hash].[ext]',
},
},
},
Expand Down

0 comments on commit 3587c55

Please sign in to comment.