@tuya-sat/micro-script 3.0.0-beta.21 → 3.0.0-beta.22
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.
|
@@ -17,26 +17,26 @@ const reactConfig = ({ isDev, isBuild, currentFramework, isTs, }) => {
|
|
|
17
17
|
include: paths_1.default.appSrc,
|
|
18
18
|
use: [
|
|
19
19
|
{
|
|
20
|
-
loader: require.resolve(
|
|
20
|
+
loader: require.resolve('babel-loader'),
|
|
21
21
|
options: {
|
|
22
22
|
presets: [
|
|
23
23
|
[
|
|
24
|
-
require.resolve(
|
|
24
|
+
require.resolve('@babel/preset-env'),
|
|
25
25
|
{
|
|
26
|
-
useBuiltIns:
|
|
26
|
+
useBuiltIns: 'entry',
|
|
27
27
|
corejs: 3,
|
|
28
28
|
},
|
|
29
29
|
],
|
|
30
30
|
[
|
|
31
|
-
require.resolve(
|
|
31
|
+
require.resolve('@babel/preset-react'),
|
|
32
32
|
{
|
|
33
|
-
runtime:
|
|
33
|
+
runtime: 'automatic',
|
|
34
34
|
},
|
|
35
35
|
],
|
|
36
|
-
isTs && require.resolve(
|
|
36
|
+
isTs && require.resolve('@babel/preset-typescript'),
|
|
37
37
|
].filter(Boolean),
|
|
38
38
|
plugins: [
|
|
39
|
-
isDev && require.resolve(
|
|
39
|
+
isDev && require.resolve('react-refresh/babel'),
|
|
40
40
|
].filter(Boolean),
|
|
41
41
|
},
|
|
42
42
|
},
|
|
@@ -48,7 +48,7 @@ const reactConfig = ({ isDev, isBuild, currentFramework, isTs, }) => {
|
|
|
48
48
|
exclude: paths_1.default.appSrc,
|
|
49
49
|
use: [
|
|
50
50
|
{
|
|
51
|
-
loader: require.resolve(
|
|
51
|
+
loader: require.resolve('babel-loader'),
|
|
52
52
|
},
|
|
53
53
|
],
|
|
54
54
|
},
|
|
@@ -64,18 +64,18 @@ const reactConfig = ({ isDev, isBuild, currentFramework, isTs, }) => {
|
|
|
64
64
|
semantic: true,
|
|
65
65
|
syntactic: true,
|
|
66
66
|
},
|
|
67
|
-
mode:
|
|
67
|
+
mode: 'write-references',
|
|
68
68
|
},
|
|
69
69
|
}),
|
|
70
70
|
].filter((value) => Boolean(value)),
|
|
71
71
|
};
|
|
72
72
|
};
|
|
73
73
|
const reactTsConfig = ({ isDev, isBuild, currentFramework, }) => (Object.assign({ entry: paths_1.default.ReactTsEntryFile, resolve: {
|
|
74
|
-
extensions: [
|
|
74
|
+
extensions: ['.tsx', '.ts', '.js'],
|
|
75
75
|
plugins: [new tsconfig_paths_webpack_plugin_1.default()],
|
|
76
76
|
} }, reactConfig({ isDev, isBuild, currentFramework, isTs: true })));
|
|
77
77
|
exports.reactTsConfig = reactTsConfig;
|
|
78
78
|
const reactJsConfig = ({ isDev, isBuild, currentFramework, }) => (Object.assign({ entry: paths_1.default.ReactJsEntryFile, resolve: {
|
|
79
|
-
extensions: [
|
|
79
|
+
extensions: ['.jsx', '.js'],
|
|
80
80
|
} }, reactConfig({ isDev, isBuild, currentFramework, isTs: false })));
|
|
81
81
|
exports.reactJsConfig = reactJsConfig;
|
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.22",
|
|
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.22",
|
|
24
|
+
"@tuya-sat/micro-dev-proxy": "3.0.0-beta.22",
|
|
25
|
+
"@tuya-sat/micro-utils": "3.0.0-beta.22",
|
|
26
26
|
"@types/kill-port": "^2.0.0",
|
|
27
27
|
"babel-loader": "8.2.4",
|
|
28
28
|
"babel-plugin-import": "1.13.3",
|
|
@@ -54,13 +54,14 @@
|
|
|
54
54
|
"sass-loader": "12.6.0",
|
|
55
55
|
"style-loader": "3.3.1",
|
|
56
56
|
"svg-url-loader": "7.1.1",
|
|
57
|
-
"tsconfig-paths-webpack-plugin": "
|
|
57
|
+
"tsconfig-paths-webpack-plugin": "^4.0.0",
|
|
58
58
|
"uid": "^2.0.1",
|
|
59
59
|
"url-loader": "4.1.1",
|
|
60
60
|
"uuid": "8.3.2",
|
|
61
61
|
"vue-loader": "17.0.0",
|
|
62
|
-
"webpack": "5.
|
|
63
|
-
"webpack-
|
|
62
|
+
"webpack": "5.75.0",
|
|
63
|
+
"webpack-cli": "5.0.1",
|
|
64
|
+
"webpack-dev-server": "4.11.1",
|
|
64
65
|
"webpack-merge": "5.8.0"
|
|
65
66
|
},
|
|
66
67
|
"devDependencies": {
|