@tuya-sat/micro-script 3.0.0-beta.16 → 3.0.0-beta.19

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.
@@ -20,6 +20,7 @@ const copy_webpack_plugin_1 = __importDefault(require("copy-webpack-plugin"));
20
20
  const mini_css_extract_plugin_1 = __importDefault(require("mini-css-extract-plugin"));
21
21
  const html_webpack_plugin_1 = __importDefault(require("html-webpack-plugin"));
22
22
  const css_minimizer_webpack_plugin_1 = __importDefault(require("css-minimizer-webpack-plugin"));
23
+ const terser_webpack_plugin_1 = __importDefault(require("terser-webpack-plugin"));
23
24
  const micro_dev_loader_1 = require("@tuya-sat/micro-dev-loader");
24
25
  const path_1 = __importDefault(require("path"));
25
26
  const index_1 = require("@tuya-sat/micro-dev-loader/dist/less/utils/index");
@@ -159,7 +160,8 @@ function getCommonConfig({ isDev, isBuild, }) {
159
160
  priority: 1,
160
161
  } }),
161
162
  },
162
- minimizer: ['...', new css_minimizer_webpack_plugin_1.default()],
163
+ minimize: isBuild,
164
+ minimizer: ['...', new terser_webpack_plugin_1.default(), new css_minimizer_webpack_plugin_1.default()],
163
165
  },
164
166
  plugins: [
165
167
  new html_webpack_plugin_1.default({
@@ -33,7 +33,7 @@ const uid_1 = require("uid");
33
33
  const path = __importStar(require("path"));
34
34
  const fs_extra_1 = __importDefault(require("fs-extra"));
35
35
  function mockSaasInfo(app, microPort) {
36
- const { multiApps, isMainApp } = require(paths_1.default.microConfig);
36
+ const { multiApps, debuggerConfig: { isMainApp }, } = require(paths_1.default.microConfig);
37
37
  const idsMap = new Map();
38
38
  multiApps === null || multiApps === void 0 ? void 0 : multiApps.forEach((app) => {
39
39
  idsMap.set(app.name, { entry_id: (0, uuid_1.v4)(), oem_micro_app_id: (0, uid_1.uid)(16) });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuya-sat/micro-script",
3
- "version": "3.0.0-beta.16",
3
+ "version": "3.0.0-beta.19",
4
4
  "bin": "./dist/bin/cli.js",
5
5
  "type": "commonjs",
6
6
  "license": "MIT",
@@ -20,9 +20,9 @@
20
20
  "@babel/preset-react": "7.16.7",
21
21
  "@babel/preset-typescript": "7.16.7",
22
22
  "@pmmmwh/react-refresh-webpack-plugin": "0.5.4",
23
- "@tuya-sat/micro-dev-loader": "3.0.0-beta.16",
24
- "@tuya-sat/micro-dev-proxy": "3.0.0-beta.16",
25
- "@tuya-sat/micro-utils": "3.0.0-beta.16",
23
+ "@tuya-sat/micro-dev-loader": "3.0.0-beta.19",
24
+ "@tuya-sat/micro-dev-proxy": "3.0.0-beta.19",
25
+ "@tuya-sat/micro-utils": "3.0.0-beta.19",
26
26
  "@types/kill-port": "^2.0.0",
27
27
  "babel-loader": "8.2.4",
28
28
  "babel-plugin-import": "1.13.3",
@@ -68,6 +68,7 @@
68
68
  "@types/jest": "27.4.1",
69
69
  "@types/uuid": "8.3.4",
70
70
  "jest": "27.5.1",
71
+ "terser-webpack-plugin": "^5.3.6",
71
72
  "ts-jest": "27.1.3",
72
73
  "typescript": "4.6.2"
73
74
  },