mirror of
https://github.com/oven-sh/bun
synced 2026-02-13 04:18:58 +00:00
Split up + generate client & server bundles, support framework +router in GenerateNodeModulesBundle , read framework from package.json + rename "publicURL" to "origin" + add import.meta.filepath
Former-commit-id: 1e76ebb5375247231181ec19a6396c6acf4684fb
This commit is contained in:
@@ -290,16 +290,26 @@ JSC::JSObject *GlobalObject::moduleLoaderCreateImportMetaProperties(JSGlobalObje
|
||||
JSValue key,
|
||||
JSModuleRecord *record,
|
||||
JSValue val) {
|
||||
return nullptr;
|
||||
// auto res = Zig__GlobalObject__createImportMetaProperties(
|
||||
// globalObject,
|
||||
// loader,
|
||||
// JSValue::encode(key),
|
||||
// record,
|
||||
// JSValue::encode(val)
|
||||
// );
|
||||
|
||||
// return JSValue::decode(res).getObject();
|
||||
ZigString specifier = Zig::toZigString(key, globalObject);
|
||||
JSC::VM &vm = globalObject->vm();
|
||||
auto scope = DECLARE_THROW_SCOPE(vm);
|
||||
|
||||
JSC::JSObject *metaProperties =
|
||||
JSC::constructEmptyObject(vm, globalObject->nullPrototypeObjectStructure());
|
||||
RETURN_IF_EXCEPTION(scope, nullptr);
|
||||
|
||||
metaProperties->putDirect(vm, Identifier::fromString(vm, "filePath"), key);
|
||||
RETURN_IF_EXCEPTION(scope, nullptr);
|
||||
|
||||
// metaProperties->putDirect(vm, Identifier::fromString(vm, "resolve"),
|
||||
// globalObject->globalThis()
|
||||
// ->get(vm, Identifier::fromString("Wundle"))
|
||||
// .getObject()
|
||||
// ->get(vm, Identifier::fromString("resolve"))); );
|
||||
// RETURN_IF_EXCEPTION(scope, nullptr);
|
||||
|
||||
return metaProperties;
|
||||
}
|
||||
|
||||
JSC::JSValue GlobalObject::moduleLoaderEvaluate(JSGlobalObject *globalObject,
|
||||
|
||||
Reference in New Issue
Block a user