@tuya-sat/micro-dev-loader 2.2.18 → 2.2.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.
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import ThemePlugin from "./plugins/theme";
|
|
2
2
|
declare const filterCssVariableLoader: string;
|
|
3
3
|
declare const changeAntdGlobalImport: string;
|
|
4
|
-
|
|
4
|
+
declare const changeTuyaSatComponentImport: string;
|
|
5
|
+
export { ThemePlugin, filterCssVariableLoader, changeAntdGlobalImport, changeTuyaSatComponentImport };
|
package/dist/index.js
CHANGED
|
@@ -5,8 +5,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var index = require('./plugins/theme/index.js');
|
|
6
6
|
|
|
7
7
|
const filterCssVariableLoader = require.resolve("./loader/filterCssVariableLoader");
|
|
8
|
-
const changeAntdGlobalImport = require.resolve("./loader/changeAntdGlobalImport");
|
|
8
|
+
const changeAntdGlobalImport = require.resolve("./loader/changeAntdGlobalImport");
|
|
9
|
+
const changeTuyaSatComponentImport = require.resolve("./loader/changeTuyaSatComponentImport");
|
|
9
10
|
|
|
10
11
|
exports.ThemePlugin = index["default"];
|
|
11
12
|
exports.changeAntdGlobalImport = changeAntdGlobalImport;
|
|
13
|
+
exports.changeTuyaSatComponentImport = changeTuyaSatComponentImport;
|
|
12
14
|
exports.filterCssVariableLoader = filterCssVariableLoader;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const TUYA_SAT_COMPONENT_GLOBAL_REGEX = /@tuya-sat\/components\/(es|lib)\/styles\/variables(\.less)?$/;
|
|
6
|
+
function changeTuyaSatComponentImport(input) {
|
|
7
|
+
if (TUYA_SAT_COMPONENT_GLOBAL_REGEX.test(this.resourcePath)) {
|
|
8
|
+
return input.replace("@import '~antd/es/style/themes/variable.less'", "@import '~antd/es/style/themes/index.less'");
|
|
9
|
+
}
|
|
10
|
+
return input;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
exports["default"] = changeTuyaSatComponentImport;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tuya-sat/micro-dev-loader",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.21",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"@babel/generator": "7.17.7",
|
|
15
15
|
"@babel/plugin-syntax-typescript": "7.16.7",
|
|
16
16
|
"@babel/template": "7.16.7",
|
|
17
|
-
"@tuya-sat/micro-utils": "2.2.
|
|
17
|
+
"@tuya-sat/micro-utils": "2.2.21",
|
|
18
18
|
"cheerio": "1.0.0-rc.10",
|
|
19
19
|
"ejs": "3.1.6",
|
|
20
20
|
"fs-extra": "10.0.1",
|