inline-source
inline-source copied to clipboard
link prefetch
We have some projects, I can not set the inline attribute.
I set attribute option false, but I have some problems.
<link rel="prefetch" href="/img/next.png">
I don't want resolve the prefetch link. What should I do, thanks.
const { inlineSource } = require('inline-source');
(async () => {
const html = await inlineSource('<head><link rel="prefetch" href="/img/next.png"></head>', {
attribute: false,
compress: false,
swallowErrors: true,
rootpath: '.'
});
console.log(html);
})().catch(console.error);