fix: config
This commit is contained in:
parent
88c4f13f74
commit
83df532e97
|
@ -39,8 +39,7 @@ module.exports = class Build extends Flecks {
|
|||
static async buildRuntime(originalConfig, platforms, flecks = {}) {
|
||||
const cleanConfig = JSON.parse(JSON.stringify(originalConfig));
|
||||
// Dealias the config keys.
|
||||
const dealiasedConfig = this.environmentConfiguration(
|
||||
Object.fromEntries(
|
||||
const dealiasedConfig = Object.fromEntries(
|
||||
Object.entries(cleanConfig)
|
||||
.map(([maybeAliasedPath, config]) => {
|
||||
const index = maybeAliasedPath.indexOf(':');
|
||||
|
@ -49,7 +48,6 @@ module.exports = class Build extends Flecks {
|
|||
config,
|
||||
];
|
||||
}),
|
||||
),
|
||||
);
|
||||
const resolver = new Resolver({root: FLECKS_CORE_ROOT});
|
||||
const {paths, roots} = await explicate({
|
||||
|
@ -59,7 +57,9 @@ module.exports = class Build extends Flecks {
|
|||
importer: (request) => require(request),
|
||||
});
|
||||
const runtime = {
|
||||
config: Object.fromEntries(paths.map((path) => [path, dealiasedConfig[path] || {}])),
|
||||
config: this.environmentConfiguration(
|
||||
Object.fromEntries(paths.map((path) => [path, dealiasedConfig[path] || {}])),
|
||||
),
|
||||
flecks: Object.fromEntries(paths.map((path) => [
|
||||
path,
|
||||
flecks[path] || roots[path]?.bootstrap || {},
|
||||
|
|
|
@ -22,4 +22,5 @@ export const hooks = {
|
|||
*/
|
||||
ssr: true,
|
||||
}),
|
||||
'@flecks/web.config': async (req, flecks) => flecks.get('@flecks/react'),
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user