embedのbootエントリーポイントを分離
This commit is contained in:
@@ -161,6 +161,7 @@ export type Config = {
|
||||
driveUrl: string;
|
||||
userAgent: string;
|
||||
clientEntry: string;
|
||||
clientEmbedEntry: string;
|
||||
clientManifestExists: boolean;
|
||||
mediaProxy: string;
|
||||
externalMediaProxyEnabled: boolean;
|
||||
@@ -199,7 +200,7 @@ export function loadConfig(): Config {
|
||||
const clientManifestExists = fs.existsSync(_dirname + '/../../../built/_vite_/manifest.json');
|
||||
const clientManifest = clientManifestExists ?
|
||||
JSON.parse(fs.readFileSync(`${_dirname}/../../../built/_vite_/manifest.json`, 'utf-8'))
|
||||
: { 'src/_boot_.ts': { file: 'src/_boot_.ts' } };
|
||||
: { 'src/_boot_.ts': { file: 'src/_boot_.ts' }, 'src/_embed_boot_.ts': { file: 'src/_embed_boot_.ts' } };
|
||||
const config = yaml.load(fs.readFileSync(path, 'utf-8')) as Source;
|
||||
|
||||
const url = tryCreateUrl(config.url);
|
||||
@@ -267,6 +268,7 @@ export function loadConfig(): Config {
|
||||
: null,
|
||||
userAgent: `Misskey/${version} (${config.url})`,
|
||||
clientEntry: clientManifest['src/_boot_.ts'],
|
||||
clientEmbedEntry: clientManifest['src/_embed_boot_.ts'],
|
||||
clientManifestExists: clientManifestExists,
|
||||
perChannelMaxNoteCacheCount: config.perChannelMaxNoteCacheCount ?? 1000,
|
||||
perUserNotificationsMaxCount: config.perUserNotificationsMaxCount ?? 500,
|
||||
|
@@ -1,7 +1,7 @@
|
||||
block vars
|
||||
|
||||
block loadClientEntry
|
||||
- const clientEntry = config.clientEntry;
|
||||
- const clientEntry = embed ? config.clientEmbedEntry : config.clientEntry;
|
||||
|
||||
doctype html
|
||||
|
||||
|
Reference in New Issue
Block a user