@tuya-sat/micro-script 3.0.0-beta.19 → 3.0.0-beta.21
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.
|
@@ -40,6 +40,7 @@ const validateMicroTheme = () => {
|
|
|
40
40
|
exports.validateMicroTheme = validateMicroTheme;
|
|
41
41
|
function getCommonConfig({ isDev, isBuild, }) {
|
|
42
42
|
const { name: packageName } = require(paths_1.default.appPkg);
|
|
43
|
+
const { debuggerConfig: { isMainApp }, } = require(paths_1.default.microConfig);
|
|
43
44
|
const devMicroTheme = (0, exports.validateMicroTheme)();
|
|
44
45
|
const enableThemeCompile = isDev
|
|
45
46
|
? !!devMicroTheme
|
|
@@ -75,7 +76,7 @@ function getCommonConfig({ isDev, isBuild, }) {
|
|
|
75
76
|
};
|
|
76
77
|
function getWebpackConfig(htmlplugins) {
|
|
77
78
|
const baseConfig = {
|
|
78
|
-
mode: isBuild ? 'production' : 'development',
|
|
79
|
+
mode: isMainApp ? 'development' : isBuild ? 'production' : 'development',
|
|
79
80
|
output: {
|
|
80
81
|
filename: isBuild
|
|
81
82
|
? 'static/js/[name].[contenthash:8].js'
|
|
@@ -153,11 +154,21 @@ function getCommonConfig({ isDev, isBuild, }) {
|
|
|
153
154
|
name: 'vendors-others',
|
|
154
155
|
chunks: 'all',
|
|
155
156
|
priority: 0,
|
|
157
|
+
}, main: {
|
|
158
|
+
test: /[\\/]node_modules[\\/](@tuya-sat\/sdf-main-sdk)[\\/]/,
|
|
159
|
+
name: 'main-related',
|
|
160
|
+
chunks: 'all',
|
|
161
|
+
priority: 1,
|
|
162
|
+
}, antd: {
|
|
163
|
+
test: /[\\/]node_modules[\\/](antd|@tuya-sat\/galaxy)[\\/]/,
|
|
164
|
+
name: 'antd-related',
|
|
165
|
+
chunks: 'all',
|
|
166
|
+
priority: 2,
|
|
156
167
|
}, react: {
|
|
157
|
-
test: /[\\/]node_modules[\\/](react|react-dom)[\\/]/,
|
|
168
|
+
test: /[\\/]node_modules[\\/](react|react-dom|react-router-dom)[\\/]/,
|
|
158
169
|
name: 'react-related',
|
|
159
170
|
chunks: 'all',
|
|
160
|
-
priority:
|
|
171
|
+
priority: 3,
|
|
161
172
|
} }),
|
|
162
173
|
},
|
|
163
174
|
minimize: isBuild,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tuya-sat/micro-script",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.21",
|
|
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.
|
|
24
|
-
"@tuya-sat/micro-dev-proxy": "3.0.0-beta.
|
|
25
|
-
"@tuya-sat/micro-utils": "3.0.0-beta.
|
|
23
|
+
"@tuya-sat/micro-dev-loader": "3.0.0-beta.21",
|
|
24
|
+
"@tuya-sat/micro-dev-proxy": "3.0.0-beta.21",
|
|
25
|
+
"@tuya-sat/micro-utils": "3.0.0-beta.21",
|
|
26
26
|
"@types/kill-port": "^2.0.0",
|
|
27
27
|
"babel-loader": "8.2.4",
|
|
28
28
|
"babel-plugin-import": "1.13.3",
|