Use assets in favour of loaders

This commit is contained in:
Tusooa Zhu 2022-08-15 18:23:41 -04:00
commit ed42a099c0
No known key found for this signature in database
GPG key ID: 7B467EDE43A08224
3 changed files with 7 additions and 49 deletions

View file

@ -82,22 +82,16 @@ module.exports = {
},
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
use: {
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('img/[name].[hash:7].[ext]')
}
type: 'asset',
generator: {
filename: utils.assetsPath('img/[name].[hash:7].[ext]')
}
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
use: {
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
}
type: 'asset',
generator: {
filename: utils.assetsPath('fonts/[name].[hash:7].[ext]')
}
},
{