Home > @lynx-js/rspeedy > Output > dataUriLimit
Output.dataUriLimit property
The Output.dataUriLimit option is used to set the size threshold to inline static assets such as images and fonts.
Signature:
dataUriLimit?: number | undefined;
The default value of dataUriLimit
is 2kB.
Example 1
Inline all static assets less than 4kB:
import { defineConfig } from '@lynx-js/rspeedy'
export default defineConfig({
output: {
dataUriLimit: 4 * 1024,
},
})
Example 2
Disable inlining of static assets:
import { defineConfig } from '@lynx-js/rspeedy'
export default defineConfig({
output: {
dataUriLimit: 0,
},
})
Example 3
Inline all static assets:
import { defineConfig } from '@lynx-js/rspeedy'
export default defineConfig({
output: {
dataUriLimit: Number.MAX_SAFE_INTEGER,
},
})