fix: remove cache-loader for external resources (#4915)

This commit is contained in:
Xin Du (Clark) 2019-02-01 13:03:32 +00:00 committed by Pooya Parsa
parent be41ae1c2f
commit 0223e56dd4

View File

@ -295,33 +295,33 @@ export default class WebpackBaseConfig {
}, },
{ {
test: /\.(png|jpe?g|gif|svg|webp)$/i, test: /\.(png|jpe?g|gif|svg|webp)$/i,
use: perfLoader.asset().concat({ use: [{
loader: 'url-loader', loader: 'url-loader',
options: Object.assign( options: Object.assign(
this.loaders.imgUrl, this.loaders.imgUrl,
{ name: this.getFileName('img') } { name: this.getFileName('img') }
) )
}) }]
}, },
{ {
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/i, test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/i,
use: perfLoader.asset().concat({ use: [{
loader: 'url-loader', loader: 'url-loader',
options: Object.assign( options: Object.assign(
this.loaders.fontUrl, this.loaders.fontUrl,
{ name: this.getFileName('font') } { name: this.getFileName('font') }
) )
}) }]
}, },
{ {
test: /\.(webm|mp4|ogv)$/i, test: /\.(webm|mp4|ogv)$/i,
use: perfLoader.asset().concat({ use: [{
loader: 'file-loader', loader: 'file-loader',
options: Object.assign( options: Object.assign(
this.loaders.file, this.loaders.file,
{ name: this.getFileName('video') } { name: this.getFileName('video') }
) )
}) }]
} }
] ]
} }