ptech-preset 1.2.2 → 1.2.4

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 +4 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -249,7 +249,10 @@ function pluginCore(opts) {
249
249
  mfMerged.exposes = { ...mfMerged.exposes ?? {}, [stylesExposeKey]: `./${relFromRoot}` };
250
250
  }
251
251
  }
252
- if (typeof mfMerged.dts === "undefined") mfMerged.dts = true;
252
+ const isBuild = api?.context?.command === "build" || process.env.NODE_ENV === "production";
253
+ if (typeof mfMerged.dts === "undefined") {
254
+ mfMerged.dts = isBuild;
255
+ }
253
256
  const mfPlugin = pluginModuleFederation(mfMerged);
254
257
  await mfPlugin.setup?.(api);
255
258
  const pkgSafe = getPackageName(root) || mfMerged.name || path3.basename(root).replace(/\W+/g, "");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ptech-preset",
3
- "version": "1.2.2",
3
+ "version": "1.2.4",
4
4
  "description": "Auto Module.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",