ptech-preset 1.3.9 → 1.4.2
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.js +5 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -519,12 +519,14 @@ 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 fromEnv = process.env.CDN_URL || process.env.ASSET_PREFIX;
|
|
523
522
|
const fallbackCdn = `${CDN_BASE}${pkgSafe}/`;
|
|
524
|
-
const target = fromEnv ?? fallbackCdn;
|
|
525
523
|
if (isBuild) {
|
|
526
|
-
config.output.assetPrefix =
|
|
524
|
+
config.output.assetPrefix = fallbackCdn;
|
|
525
|
+
console.log("BUILD");
|
|
526
|
+
console.log("config.output.assetPrefix", config.output.assetPrefix);
|
|
527
527
|
} else {
|
|
528
|
+
console.log("DEV");
|
|
529
|
+
console.log("config.output.assetPrefix", config.output.assetPrefix);
|
|
528
530
|
config.output.assetPrefix = "/";
|
|
529
531
|
}
|
|
530
532
|
return config;
|