mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-16 10:39:53 +00:00
Use Puppeteer's chrome install
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
const fs = require("fs");
|
||||
|
||||
function readJsonFile(path) {
|
||||
process.env.CHROME_BIN = require('puppeteer').executablePath();
|
||||
|
||||
// TypeScript puts lots of comments in the default `tsconfig.json`, so you
|
||||
// can’t use `require()` to read it. Hence this hack.
|
||||
return eval("(" + fs.readFileSync(path).toString("utf-8") + ")");
|
||||
|
||||
Reference in New Issue
Block a user