mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Fix starting Directus using a custom start file (#15574)
This should resolve #15091 without breaking #14728.
This commit is contained in:
committed by
GitHub
parent
9b24233aa4
commit
6bcd514161
@@ -179,7 +179,7 @@ export default async function createApp(): Promise<express.Application> {
|
||||
});
|
||||
|
||||
if (env.SERVE_APP) {
|
||||
const adminPath = require.resolve('@directus/app', require.main ? { paths: [require.main.filename] } : undefined);
|
||||
const adminPath = require.resolve('@directus/app');
|
||||
const adminUrl = new Url(env.PUBLIC_URL).addPath('admin');
|
||||
|
||||
// Set the App's base path according to the APIs public URL
|
||||
|
||||
@@ -324,9 +324,7 @@ class ExtensionManager {
|
||||
}
|
||||
|
||||
private async getSharedDepsMapping(deps: string[]) {
|
||||
const appDir = await fse.readdir(
|
||||
path.join(resolvePackage('@directus/app', require.main?.filename), 'dist', 'assets')
|
||||
);
|
||||
const appDir = await fse.readdir(path.join(resolvePackage('@directus/app', __dirname), 'dist', 'assets'));
|
||||
|
||||
const depsMapping: Record<string, string> = {};
|
||||
for (const dep of deps) {
|
||||
|
||||
Reference in New Issue
Block a user