ptech-preset 1.4.4 → 1.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -0
- package/dist/index.js +7 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -146,7 +146,7 @@ var DEFAULT_SHARED = {
|
|
|
146
146
|
requiredVersion: false
|
|
147
147
|
}
|
|
148
148
|
};
|
|
149
|
-
var CDN_BASE = "https://oneportal.
|
|
149
|
+
var CDN_BASE = "https://oneportal-ehckg7axe3dacxhw.a01.azurefd.net/external/ts/";
|
|
150
150
|
function getPackageName(root) {
|
|
151
151
|
try {
|
|
152
152
|
const pkgPath = path3.resolve(root, "package.json");
|
|
@@ -354,6 +354,7 @@ function pluginCore(opts) {
|
|
|
354
354
|
separateExposeChunkPrefix = "mf-expose-",
|
|
355
355
|
typesFolder = "@mf-types",
|
|
356
356
|
devTypesRefreshEnvVar = "MF_DTS_REFRESH",
|
|
357
|
+
isHost,
|
|
357
358
|
mf
|
|
358
359
|
} = opts;
|
|
359
360
|
if (!mf || typeof mf !== "object") {
|
|
@@ -522,7 +523,11 @@ function pluginCore(opts) {
|
|
|
522
523
|
config.output ??= {};
|
|
523
524
|
const fallbackCdn = `${CDN_BASE}${pkgSafe}/`;
|
|
524
525
|
if (isBuild) {
|
|
525
|
-
|
|
526
|
+
if (isHost) {
|
|
527
|
+
config.output.assetPrefix = "/";
|
|
528
|
+
} else {
|
|
529
|
+
config.output.assetPrefix = fallbackCdn;
|
|
530
|
+
}
|
|
526
531
|
} else {
|
|
527
532
|
config.output.assetPrefix = "/";
|
|
528
533
|
}
|