From db3fda3dd651e8db91e49945f072ea69ef0b48f6 Mon Sep 17 00:00:00 2001 From: Oj Date: Mon, 5 Apr 2021 11:16:57 +0100 Subject: [PATCH] [PCPlugin] Rewrite original JS code and use relative path --- src/preprocessors/pcPlugin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/preprocessors/pcPlugin.js b/src/preprocessors/pcPlugin.js index 823cc38..5c2e11f 100644 --- a/src/preprocessors/pcPlugin.js +++ b/src/preprocessors/pcPlugin.js @@ -4,7 +4,7 @@ export default (manifestPath, repo) => { const pcManifest = JSON.parse(readFileSync(manifestPath, 'utf8')); let manifest = { - main: 'index.js', + main: '../index.js', tags: ['port'], name: pcManifest.name, @@ -22,5 +22,5 @@ export default (manifestPath, repo) => { const jsCode = content.replace(`module.exports = class`, `export default new class`).replace(/{ *Plugin *}/, `{ Plugin, powercord }`); writeFileSync(`${manifestPath}/goosemodModule.json`, JSON.stringify(manifest)); - writeFileSync(`${manifestPath}/index.js`, jsCode); + writeFileSync(`${manifestPath}/../index.js`, jsCode); };