0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-04-01 17:41:50 -05:00

🐛 Fix exception on manifest reading on release build

This commit is contained in:
Andrey Antukh 2023-12-29 17:22:04 +01:00
parent 22b326e2b9
commit 04dbe5f741

View file

@ -146,8 +146,8 @@ function readLocales() {
function readManifest() {
try {
const path = __dirname + "/resources/public/js/manifest.json";
const content = JSON.parse(fs.readFileSync(path, { encoding: "utf8" }));
const manifestPath = path.resolve("resources/public/js/manifest.json");
const content = JSON.parse(fs.readFileSync(manifestPath, { encoding: "utf8" }));
const index = {
config: "js/config.js?ts=" + Date.now(),
@ -160,7 +160,7 @@ function readManifest() {
return index;
} catch (e) {
console.error("Error on reading manifest, using default.");
console.error("Error on reading manifest, using default.", e);
return {
config: "js/config.js",
polyfills: "js/polyfills.js",