mirror of
https://github.com/penpot/penpot.git
synced 2025-05-14 12:36:37 +02:00
🐛 Fix exception on manifest reading on release build
This commit is contained in:
parent
22b326e2b9
commit
04dbe5f741
1 changed files with 3 additions and 3 deletions
|
@ -146,8 +146,8 @@ function readLocales() {
|
||||||
|
|
||||||
function readManifest() {
|
function readManifest() {
|
||||||
try {
|
try {
|
||||||
const path = __dirname + "/resources/public/js/manifest.json";
|
const manifestPath = path.resolve("resources/public/js/manifest.json");
|
||||||
const content = JSON.parse(fs.readFileSync(path, { encoding: "utf8" }));
|
const content = JSON.parse(fs.readFileSync(manifestPath, { encoding: "utf8" }));
|
||||||
|
|
||||||
const index = {
|
const index = {
|
||||||
config: "js/config.js?ts=" + Date.now(),
|
config: "js/config.js?ts=" + Date.now(),
|
||||||
|
@ -160,7 +160,7 @@ function readManifest() {
|
||||||
|
|
||||||
return index;
|
return index;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error("Error on reading manifest, using default.");
|
console.error("Error on reading manifest, using default.", e);
|
||||||
return {
|
return {
|
||||||
config: "js/config.js",
|
config: "js/config.js",
|
||||||
polyfills: "js/polyfills.js",
|
polyfills: "js/polyfills.js",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue