We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3389a2a commit 0c5c808Copy full SHA for 0c5c808
adminforth/modules/utils.ts
@@ -173,8 +173,11 @@ export function guessLabelFromName(name) {
173
export const currentFileDir = (metaUrl) => {
174
const __filename = fileURLToPath(metaUrl);
175
let __dirname = path.dirname(__filename);
176
- if (__dirname.endsWith('/dist/modules')) {
177
- // in prod build we are in dist also, so make another back jump to go true sorces
+
+ // Check for dist/modules in both Unix and Windows path formats
178
+ const normalizedDir = __dirname.replace(/\\/g, '/');
179
+ if (normalizedDir.endsWith('/dist/modules')) {
180
+ // in prod build we are in dist also, so make another back jump to go to sources
181
__dirname = path.join(__dirname, '..');
182
}
183
return __dirname;
0 commit comments