Skip to content

Commit

Permalink
Changed how index is loaded to improve performance
Browse files Browse the repository at this point in the history
  • Loading branch information
dragomirtitian committed Jan 11, 2022
1 parent 3f0dbea commit 2767ae9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib/output/plugins/JavascriptIndexPlugin.ts
Expand Up @@ -106,6 +106,9 @@ export class JavascriptIndexPlugin extends RendererComponent {
index,
});

writeFileSync(jsonFileName, `window.searchData = ${jsonData}`);
writeFileSync(
jsonFileName,
`window.searchData = JSON.parse(${JSON.stringify(jsonData)});`
);
}
}

0 comments on commit 2767ae9

Please sign in to comment.