mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Fix linking the app client when TLA is disabled
This commit is contained in:
@@ -60,6 +60,7 @@ var Module = function (options) {
|
||||
// options
|
||||
self.useGlobalNamespace = options.useGlobalNamespace;
|
||||
self.combinedServePath = options.combinedServePath;
|
||||
self.addEagerRequires = !!options.addEagerRequires;
|
||||
};
|
||||
|
||||
Object.assign(Module.prototype, {
|
||||
@@ -209,6 +210,10 @@ Object.assign(Module.prototype, {
|
||||
if (file.mainModule) {
|
||||
result.mainModulePath = file.absModuleId;
|
||||
}
|
||||
|
||||
if (self.addEagerRequires) {
|
||||
chunks.push(`\nrequire(${JSON.stringify(file.absModuleId)});`);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -1151,6 +1156,10 @@ export var fullLink = Profile("linker.fullLink", async function (inputFiles, {
|
||||
bundleArch,
|
||||
useGlobalNamespace: isApp,
|
||||
combinedServePath,
|
||||
// To support `/client/compatibility`, we can't use the runtime for the
|
||||
// app on the client when TLA is disabled since it wraps all of
|
||||
// the app code in a function. Instead, we have the module add eager requires.
|
||||
addEagerRequires: !bundleArch.startsWith('os.') && isApp && !enableClientTLA
|
||||
});
|
||||
|
||||
// Check if the core-runtime package will already be loaded
|
||||
|
||||
Reference in New Issue
Block a user