Closed HZSamir closed 7 years ago
Please disregard this issue. I have managed to solve it by monkey-patching the chdir method like so:
const path = require('path');
let cwd = '';
process.chdir = (newPath) => {
cwd = newPath;
};
const originalReadFileSync = require('fs').readFileSync;
require('fs').readFileSync = (filePath, ...args) => {
let newPath = filePath;
return originalReadFileSync(newPath, ...args);
};
Hello, Not exactly an issue but I wonder if it would be possible to demeteorize my Meteor app without resorting to
process.chdir(require('path').join(__dirname, 'programs', 'server'));
Something like rewring all the paths to match their location.The reason being that I'm trying to bundle it inside an ASAR file, which does not play well with Chdir.
Is it at all possible? Thank you.