Skip to content

Commit

Permalink
no need for file-loader, we can use asset/resource type, although it …
Browse files Browse the repository at this point in the history
…doesn't seem we have any image import in code
  • Loading branch information
vincentfretin committed May 18, 2024
1 parent 7cdd187 commit e9ed7e7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 17 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"classnames": "^2.3.2",
"clipboard": "^2.0.11",
"date-fns": "^2.30.0",
"file-loader": "^6.2.0",
"firebase": "^9.23.0",
"lodash-es": "^4.17.21",
"prop-types": "^15.8.1",
Expand Down
12 changes: 4 additions & 8 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,10 @@ module.exports = {
},
{
test: /\.(png|jpe?g|gif)$/i,
use: [
{
loader: 'file-loader',
options: {
name: 'images/[name].[ext]'
}
}
]
type: 'asset/resource',
generator: {
filename: 'images/[name].[ext]'
}
}
]
}
Expand Down
12 changes: 4 additions & 8 deletions webpack.prod.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,10 @@ module.exports = {
},
{
test: /\.(png|jpe?g|gif)$/i,
use: [
{
loader: 'file-loader',
options: {
name: 'images/[name].[ext]'
}
}
]
type: 'asset/resource',
generator: {
filename: 'images/[name].[ext]'
}
}
]
}
Expand Down

0 comments on commit e9ed7e7

Please sign in to comment.