jmash-core-mp 0.1.63 → 0.1.64

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/mpx.config.js CHANGED
@@ -16,9 +16,20 @@ module.exports = defineConfig({
16
16
  },
17
17
  },
18
18
  loader: {},
19
- unocss: {},
20
19
  },
21
20
  },
21
+ chainWebpack(config) {
22
+ const rules = config.module.rules;
23
+ rules.store.forEach((rule) => {
24
+ if (!rule || !rule.uses) return;
25
+ const use = rule.uses.get("ts-loader");
26
+ if (!use) return;
27
+ use.tap((options = {}) => ({
28
+ ...options,
29
+ allowTsInNodeModules: true,
30
+ }));
31
+ });
32
+ },
22
33
  /**
23
34
  * 如果希望node_modules下的文件时对应的缓存可以失效,
24
35
  * 可以将configureWebpack.snap.managedPaths修改为 []
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jmash-core-mp",
3
- "version": "0.1.63",
3
+ "version": "0.1.64",
4
4
  "private": false,
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -108,10 +108,14 @@ createComponent({
108
108
  });
109
109
  return;
110
110
  }
111
- if (url && !tabbar) {
112
- mpx.navigateTo({ url });
113
- } else if (url && tabbar) {
114
- mpx.switchTab({ url });
111
+ if (!url) {
112
+ mpx.showToast({ title: "暂未开放,敬请期待", icon: "none" });
113
+ return;
114
+ }
115
+ if (url && tabbar === false) {
116
+ mpx.navigateTo({ url: url });
117
+ } else if (url && tabbar === true) {
118
+ mpx.switchTab({ url: url });
115
119
  }
116
120
  }
117
121