mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Refine URL prefix logic to exclude just web.browser[.legacy].
This still leaves web.cordova as the only architecture whose URLs get prefixed (with /__cordova/), but the implementation better reflects the special status of web.browser and web.browser.legacy as architectures that the webapp and dynamic-import packages understand how to disambiguate using the isModern test from the modern-browsers package.
This commit is contained in:
@@ -567,8 +567,16 @@ class File {
|
||||
this.url = null;
|
||||
|
||||
// A prefix that will be prepended to this.url.
|
||||
// Prefixing is currently restricted to Cordova URLs.
|
||||
if (options.arch === "web.cordova") {
|
||||
// Prefixing is currently restricted to web.cordova URLs.
|
||||
if (options.arch.startsWith("web.") &&
|
||||
// Using the isModern function from the modern-browsers package,
|
||||
// the webapp and dynamic-import packages can automatically
|
||||
// determine whether a client should receive resources from the
|
||||
// web.browser or web.browser.legacy architecture, so those
|
||||
// architectures do not need a URL prefix. Other architectures,
|
||||
// such as web.cordova, still need a prefix like /__cordova/.
|
||||
options.arch !== "web.browser" &&
|
||||
options.arch !== "web.browser.legacy") {
|
||||
this.urlPrefix = "/__" +
|
||||
options.arch.split(".").slice(1).join(".");
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user