ptech-preset 1.3.8 → 1.3.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.
Files changed (2) hide show
  1. package/dist/index.js +3 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -519,12 +519,13 @@ function pluginCore(opts) {
519
519
  const pkgSafe = getPackageName(root) || mfMerged.name || path3.basename(root).replace(/\W+/g, "");
520
520
  api.modifyRsbuildConfig((config) => {
521
521
  config.output ??= {};
522
- const current = config.output.assetPrefix;
523
522
  const fromEnv = process.env.CDN_URL || process.env.ASSET_PREFIX;
524
523
  const fallbackCdn = `${CDN_BASE}${pkgSafe}/`;
525
524
  const target = fromEnv ?? fallbackCdn;
526
- if (isBuild && (!current || current === "/" || current === "./")) {
525
+ if (isBuild) {
527
526
  config.output.assetPrefix = target;
527
+ } else {
528
+ config.output.assetPrefix = "/";
528
529
  }
529
530
  return config;
530
531
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ptech-preset",
3
- "version": "1.3.8",
3
+ "version": "1.3.9",
4
4
  "description": "Auto Module.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",