diff --git a/docs/guide/html-and-static-assets.md b/docs/guide/html-and-static-assets.md index 00ed7c459..1e070055a 100644 --- a/docs/guide/html-and-static-assets.md +++ b/docs/guide/html-and-static-assets.md @@ -125,7 +125,22 @@ will be compiled into: h('img', { attrs: { src: require('./image.png') }}) ``` -Internally, we use `file-loader` to determine the final file location with version hashes and correct public base paths, and use `url-loader` to conditionally inline assets that are smaller than 10kb, reducing the amount of HTTP requests. +Internally, we use `file-loader` to determine the final file location with version hashes and correct public base paths, and use `url-loader` to conditionally inline assets that are smaller than 4kb, reducing the amount of HTTP requests. + +You can adjust the inline file size limit via [chainWebpack](../config/#chainwebpack). For example, to set the limit to 10kb instead: + +``` js +// vue.config.js +module.exports = { + chainWebpack: config => { + config.module + .rule('images') + .use('url-loader') + .loader('url-loader') + .tap(options => Object.assign(options, { limit: 10240 })) + } +} +``` ### URL Transform Rules