@tarojs/runner-utils 3.7.0-alpha.11 → 3.7.0-alpha.13
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/constant.js +2 -1
- package/dist/index.js +4 -1
- package/dist/vite.js +31 -0
- package/package.json +2 -2
- package/types/constant.d.ts +1 -0
- package/types/index.d.ts +2 -1
- package/types/vite.d.ts +2 -0
package/dist/constant.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DEFAULT_Components = void 0;
|
|
3
|
+
exports.VITE_COMPILER_LABEL = exports.DEFAULT_Components = void 0;
|
|
4
4
|
exports.DEFAULT_Components = new Set([
|
|
5
5
|
'view',
|
|
6
6
|
'scroll-view',
|
|
@@ -46,3 +46,4 @@ exports.DEFAULT_Components = new Set([
|
|
|
46
46
|
'official-account',
|
|
47
47
|
'editor'
|
|
48
48
|
]);
|
|
49
|
+
exports.VITE_COMPILER_LABEL = 'taro:compiler';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MultiPlatformPlugin = exports.getSassLoaderOption = exports.getBundleResult = exports.getBundleContent = exports.DEFAULT_Components = void 0;
|
|
3
|
+
exports.MultiPlatformPlugin = exports.getViteMiniCompiler = exports.getViteH5Compiler = exports.getSassLoaderOption = exports.getBundleResult = exports.getBundleContent = exports.DEFAULT_Components = void 0;
|
|
4
4
|
const constant_1 = require("./constant");
|
|
5
5
|
Object.defineProperty(exports, "DEFAULT_Components", { enumerable: true, get: function () { return constant_1.DEFAULT_Components; } });
|
|
6
6
|
const MultiPlatformPlugin_1 = require("./resolve/MultiPlatformPlugin");
|
|
@@ -9,3 +9,6 @@ const scss_1 = require("./scss");
|
|
|
9
9
|
Object.defineProperty(exports, "getBundleContent", { enumerable: true, get: function () { return scss_1.getBundleContent; } });
|
|
10
10
|
Object.defineProperty(exports, "getBundleResult", { enumerable: true, get: function () { return scss_1.getBundleResult; } });
|
|
11
11
|
Object.defineProperty(exports, "getSassLoaderOption", { enumerable: true, get: function () { return scss_1.getSassLoaderOption; } });
|
|
12
|
+
const vite_1 = require("./vite");
|
|
13
|
+
Object.defineProperty(exports, "getViteH5Compiler", { enumerable: true, get: function () { return vite_1.getViteH5Compiler; } });
|
|
14
|
+
Object.defineProperty(exports, "getViteMiniCompiler", { enumerable: true, get: function () { return vite_1.getViteMiniCompiler; } });
|
package/dist/vite.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.getViteMiniCompiler = exports.getViteH5Compiler = void 0;
|
|
13
|
+
const constant_1 = require("./constant");
|
|
14
|
+
function getViteH5Compiler(rollupPluginContext) {
|
|
15
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
16
|
+
const info = process.env.NODE_ENV === 'production'
|
|
17
|
+
?
|
|
18
|
+
rollupPluginContext.getModuleInfo(constant_1.VITE_COMPILER_LABEL)
|
|
19
|
+
:
|
|
20
|
+
yield rollupPluginContext.load({ id: constant_1.VITE_COMPILER_LABEL });
|
|
21
|
+
const compiler = info === null || info === void 0 ? void 0 : info.meta.compiler;
|
|
22
|
+
return compiler;
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
exports.getViteH5Compiler = getViteH5Compiler;
|
|
26
|
+
function getViteMiniCompiler(rollupPluginContext) {
|
|
27
|
+
const info = rollupPluginContext.getModuleInfo(constant_1.VITE_COMPILER_LABEL);
|
|
28
|
+
const compiler = info === null || info === void 0 ? void 0 : info.meta.compiler;
|
|
29
|
+
return compiler;
|
|
30
|
+
}
|
|
31
|
+
exports.getViteMiniCompiler = getViteMiniCompiler;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/runner-utils",
|
|
3
|
-
"version": "3.7.0-alpha.
|
|
3
|
+
"version": "3.7.0-alpha.13",
|
|
4
4
|
"description": "Taro runner utilities.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "types/index.d.ts",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"scss-bundle": "^3.0.2",
|
|
22
|
-
"@tarojs/helper": "3.7.0-alpha.
|
|
22
|
+
"@tarojs/helper": "3.7.0-alpha.13"
|
|
23
23
|
},
|
|
24
24
|
"scripts": {
|
|
25
25
|
"build": "tsc",
|
package/types/constant.d.ts
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DEFAULT_Components } from './constant';
|
|
2
2
|
import { MultiPlatformPlugin } from './resolve/MultiPlatformPlugin';
|
|
3
3
|
import { getBundleContent, getBundleResult, getSassLoaderOption } from './scss';
|
|
4
|
-
|
|
4
|
+
import { getViteH5Compiler, getViteMiniCompiler } from './vite';
|
|
5
|
+
export { DEFAULT_Components, getBundleContent, getBundleResult, getSassLoaderOption, getViteH5Compiler, getViteMiniCompiler, MultiPlatformPlugin };
|
package/types/vite.d.ts
ADDED