Skip to content
This repository has been archived by the owner on Jan 1, 2024. It is now read-only.

Commit

Permalink
fix(webpack_config): remove url-loader duplication in server and clie…
Browse files Browse the repository at this point in the history
…nt configs

fix(webpack_config): remove url-loader duplication in server and client
configs
  • Loading branch information
Metnew committed Nov 7, 2017
1 parent ba31463 commit 7cea591
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 27 deletions.
14 changes: 0 additions & 14 deletions webpack_config/client/webpack.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,6 @@ const baseBuild = {
{
test: /\.(ico|eot|otf|webp|ttf|woff|woff2)$/i,
use: `file-loader?limit=100000&name=assets/[name].[hash:6].[ext]`
},
{
test: /\.(jpe?g|png|gif|svg)$/,
use: [
{
loader: 'url-loader',
options: {
limit: 4096,
// path: '/images',
name: 'images/[name].[hash:6].[ext]'
}
},
'img-loader'
]
}
// NOTE: LQIP loader doesn't work with file-loader and url-loader :(
// `npm i --save-dev lqip-loader`
Expand Down
13 changes: 0 additions & 13 deletions webpack_config/server/webpack.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,6 @@ const baseWebpackConfig = {
// }
// ]
// }
{
test: /\.(jpe?g|png|gif|svg)$/,
use: [
{
loader: 'url-loader',
options: {
limit: 4096,
name: 'images/[name].[hash:6].[ext]'
}
},
'img-loader'
]
}
])
},
plugins: isomorphicWebpackConfig.plugins.concat([
Expand Down
13 changes: 13 additions & 0 deletions webpack_config/webpack.isomorphic.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@ export default {
test: /\.(js|jsx)$/,
use: 'babel-loader',
exclude: [/node_modules/]
},
{
test: /\.(jpe?g|png|gif|svg)$/,
use: [
{
loader: 'url-loader',
options: {
limit: 4096,
name: 'images/[name].[hash:6].[ext]'
}
},
'img-loader'
]
}
]
},
Expand Down

0 comments on commit 7cea591

Please sign in to comment.