@tuya-sat/micro-script 0.0.1-beta.2 → 0.0.1-beta.3
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.
|
@@ -15,7 +15,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
const copy_webpack_plugin_1 = __importDefault(require("copy-webpack-plugin"));
|
|
16
16
|
const html_webpack_plugin_1 = __importDefault(require("html-webpack-plugin"));
|
|
17
17
|
const mini_css_extract_plugin_1 = __importDefault(require("mini-css-extract-plugin"));
|
|
18
|
-
const micro_dev_loader_1 = require("@tuya-sat/micro-dev-loader");
|
|
19
18
|
const paths_1 = __importDefault(require("./paths"));
|
|
20
19
|
function getCommonConfig({ isDev, isBuild }) {
|
|
21
20
|
const { name: packageName } = require(paths_1.default.appPkg);
|
|
@@ -140,7 +139,6 @@ function getCommonConfig({ isDev, isBuild }) {
|
|
|
140
139
|
filename: "static/css/[name].[contenthash:8].css",
|
|
141
140
|
chunkFilename: "static/css/[name].[contenthash:8].chunk.css",
|
|
142
141
|
}),
|
|
143
|
-
isDev && new micro_dev_loader_1.LayoutMockPlugin(),
|
|
144
142
|
].filter(Boolean),
|
|
145
143
|
};
|
|
146
144
|
}
|
|
@@ -22,6 +22,14 @@ declare const reactTsConfig: ({ isDev, isBuild, currentFramework }: {
|
|
|
22
22
|
plugins: string[];
|
|
23
23
|
};
|
|
24
24
|
}[];
|
|
25
|
+
exclude?: undefined;
|
|
26
|
+
} | {
|
|
27
|
+
test: RegExp;
|
|
28
|
+
exclude: string;
|
|
29
|
+
use: {
|
|
30
|
+
loader: string;
|
|
31
|
+
}[];
|
|
32
|
+
include?: undefined;
|
|
25
33
|
} | {
|
|
26
34
|
test: string;
|
|
27
35
|
include: string;
|
|
@@ -31,6 +39,7 @@ declare const reactTsConfig: ({ isDev, isBuild, currentFramework }: {
|
|
|
31
39
|
microFramework: any;
|
|
32
40
|
};
|
|
33
41
|
}[];
|
|
42
|
+
exclude?: undefined;
|
|
34
43
|
})[];
|
|
35
44
|
};
|
|
36
45
|
plugins: (ReactRefreshWebpackPlugin | ForkTsCheckerWebpackPlugin)[];
|
|
@@ -61,6 +70,14 @@ declare const reactJsConfig: ({ isDev, isBuild, currentFramework }: {
|
|
|
61
70
|
plugins: string[];
|
|
62
71
|
};
|
|
63
72
|
}[];
|
|
73
|
+
exclude?: undefined;
|
|
74
|
+
} | {
|
|
75
|
+
test: RegExp;
|
|
76
|
+
exclude: string;
|
|
77
|
+
use: {
|
|
78
|
+
loader: string;
|
|
79
|
+
}[];
|
|
80
|
+
include?: undefined;
|
|
64
81
|
} | {
|
|
65
82
|
test: string;
|
|
66
83
|
include: string;
|
|
@@ -70,6 +87,7 @@ declare const reactJsConfig: ({ isDev, isBuild, currentFramework }: {
|
|
|
70
87
|
microFramework: any;
|
|
71
88
|
};
|
|
72
89
|
}[];
|
|
90
|
+
exclude?: undefined;
|
|
73
91
|
})[];
|
|
74
92
|
};
|
|
75
93
|
plugins: (ReactRefreshWebpackPlugin | ForkTsCheckerWebpackPlugin)[];
|
|
@@ -40,6 +40,16 @@ const reactConfig = ({ isDev, isBuild, currentFramework, isTs }) => {
|
|
|
40
40
|
},
|
|
41
41
|
],
|
|
42
42
|
},
|
|
43
|
+
//处理@tuya-sat/components内的antd组件引用
|
|
44
|
+
{
|
|
45
|
+
test: /node_modules\/@tuya-sat\/components\/(.*?).js$/,
|
|
46
|
+
exclude: paths_1.default.appSrc,
|
|
47
|
+
use: [
|
|
48
|
+
{
|
|
49
|
+
loader: "babel-loader",
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
},
|
|
43
53
|
isDev && {
|
|
44
54
|
test: isTs ? paths_1.default.ReactTsEntryFile : paths_1.default.ReactJsEntryFile,
|
|
45
55
|
include: paths_1.default.appSrc,
|
package/dist/scripts/start.js
CHANGED
|
@@ -28,6 +28,7 @@ const config = Object.assign(Object.assign({}, (0, webpack_config_1.default)()),
|
|
|
28
28
|
level: "warn",
|
|
29
29
|
}, stats: "errors-warnings" });
|
|
30
30
|
const compiler = (0, webpack_1.default)(config);
|
|
31
|
+
new micro_dev_loader_1.LayoutMockPlugin().apply(compiler);
|
|
31
32
|
(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
32
33
|
let defaultPort = 9000;
|
|
33
34
|
//检测端口占用情况
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tuya-sat/micro-script",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.3",
|
|
4
4
|
"bin": "./dist/bin/cli.js",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"license": "MIT",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"@babel/preset-react": "^7.14.5",
|
|
16
16
|
"@babel/preset-typescript": "^7.15.0",
|
|
17
17
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.1",
|
|
18
|
-
"@tuya-sat/micro-dev-loader": "0.0.1-beta.
|
|
19
|
-
"@tuya-sat/micro-dev-proxy": "0.0.1-beta.
|
|
18
|
+
"@tuya-sat/micro-dev-loader": "0.0.1-beta.3",
|
|
19
|
+
"@tuya-sat/micro-dev-proxy": "0.0.1-beta.3",
|
|
20
20
|
"babel-loader": "^8.2.2",
|
|
21
21
|
"babel-plugin-import": "^1.13.3",
|
|
22
22
|
"copy-webpack-plugin": "^9.0.1",
|