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 CHANGED
@@ -18,6 +18,7 @@ type MfAutoOptions = {
18
18
  /** env để ép refresh types ở dev (khởi động lại dev) */
19
19
  devTypesRefreshEnvVar?: string;
20
20
  mf: Record<string, any>;
21
+ isHost?: boolean;
21
22
  };
22
23
  declare function pluginCore(opts: MfAutoOptions): RsbuildPlugin;
23
24
 
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.blob.core.windows.net/external/ts/";
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
- config.output.assetPrefix = fallbackCdn;
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ptech-preset",
3
- "version": "1.4.4",
3
+ "version": "1.4.9",
4
4
  "description": "Auto Module.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",