-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(bake): css, production build, dev separateSSRGraph=false (#14622)
Co-authored-by: Jarred Sumner <[email protected]> Co-authored-by: paperdave <[email protected]> Co-authored-by: Jarred-Sumner <[email protected]>
- Loading branch information
1 parent
5237869
commit e93c5ad
Showing
63 changed files
with
3,479 additions
and
1,736 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#include "BakeProduction.h" | ||
#include "BunBuiltinNames.h" | ||
#include "WebCoreJSBuiltins.h" | ||
#include "JavaScriptCore/JSPromise.h" | ||
#include "JavaScriptCore/Exception.h" | ||
|
||
namespace Bake { | ||
|
||
extern "C" JSC::JSPromise* BakeRenderRoutesForProd( | ||
JSC::JSGlobalObject* global, | ||
BunString outbase, | ||
JSC::JSValue renderStaticCallback, | ||
JSC::JSValue clientEntryUrl, | ||
JSC::JSValue files, | ||
JSC::JSValue patterns, | ||
JSC::JSValue styles) | ||
{ | ||
JSC::VM& vm = global->vm(); | ||
JSC::JSFunction* cb = JSC::JSFunction::create(vm, global, WebCore::bakeRenderRoutesForProdCodeGenerator(vm), global); | ||
JSC::CallData callData = JSC::getCallData(cb); | ||
|
||
JSC::MarkedArgumentBuffer args; | ||
args.append(JSC::jsString(vm, outbase.toWTFString())); | ||
args.append(renderStaticCallback); | ||
args.append(clientEntryUrl); | ||
args.append(files); | ||
args.append(patterns); | ||
args.append(styles); | ||
|
||
NakedPtr<JSC::Exception> returnedException = nullptr; | ||
auto result = JSC::call(global, cb, callData, JSC::jsUndefined(), args, returnedException); | ||
if (UNLIKELY(returnedException)) { | ||
// This should be impossible because it returns a promise. | ||
return JSC::JSPromise::rejectedPromise(global, returnedException->value()); | ||
} | ||
return JSC::jsCast<JSC::JSPromise*>(result); | ||
} | ||
|
||
} // namespace Bake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#include "root.h" | ||
#include "headers-handwritten.h" | ||
|
||
namespace Bake { | ||
} // namespace Bake |
Oops, something went wrong.