mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-13 16:23:34 +02:00
refactor(lqip-loader): split test files (#6858)
This commit is contained in:
parent
f763ac13a9
commit
5e2168ea22
5 changed files with 33 additions and 25 deletions
|
@ -25,6 +25,8 @@ export default async function lqipLoader(
|
|||
|
||||
const config = this.getOptions() || {};
|
||||
config.base64 = 'base64' in config ? config.base64 : true;
|
||||
// color palette generation is set to false by default
|
||||
// since it is little bit slower than base64 generation
|
||||
config.palette = 'palette' in config ? config.palette : false;
|
||||
|
||||
let content = contentBuffer.toString('utf8');
|
||||
|
@ -53,8 +55,6 @@ export default async function lqipLoader(
|
|||
|
||||
const outputPromises: [Promise<string> | null, Promise<string[]> | null] = [
|
||||
config.base64 === true ? lqip.base64(imgPath) : null,
|
||||
// color palette generation is set to false by default
|
||||
// since it is little bit slower than base64 generation
|
||||
config.palette === true ? lqip.palette(imgPath) : null,
|
||||
];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue