@tarojs/runner-utils 3.7.0-alpha.14 → 3.7.0-alpha.16
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/vite.js +7 -7
- package/package.json +8 -2
- package/types/vite.d.ts +4 -2
package/dist/vite.js
CHANGED
|
@@ -9,23 +9,23 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.getViteMiniCompilerContext = exports.getViteH5CompilerContext = void 0;
|
|
13
13
|
const constant_1 = require("./constant");
|
|
14
|
-
function
|
|
14
|
+
function getViteH5CompilerContext(rollupPluginContext) {
|
|
15
15
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16
16
|
const info = process.env.NODE_ENV === 'production'
|
|
17
17
|
?
|
|
18
18
|
rollupPluginContext.getModuleInfo(constant_1.VITE_COMPILER_LABEL)
|
|
19
19
|
:
|
|
20
20
|
yield rollupPluginContext.load({ id: constant_1.VITE_COMPILER_LABEL });
|
|
21
|
-
const compiler = info === null || info === void 0 ? void 0 : info.meta.
|
|
21
|
+
const compiler = info === null || info === void 0 ? void 0 : info.meta.viteCompilerContext;
|
|
22
22
|
return compiler;
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
exports.
|
|
26
|
-
function
|
|
25
|
+
exports.getViteH5CompilerContext = getViteH5CompilerContext;
|
|
26
|
+
function getViteMiniCompilerContext(rollupPluginContext) {
|
|
27
27
|
const info = rollupPluginContext.getModuleInfo(constant_1.VITE_COMPILER_LABEL);
|
|
28
|
-
const compiler = info === null || info === void 0 ? void 0 : info.meta.
|
|
28
|
+
const compiler = info === null || info === void 0 ? void 0 : info.meta.viteCompilerContext;
|
|
29
29
|
return compiler;
|
|
30
30
|
}
|
|
31
|
-
exports.
|
|
31
|
+
exports.getViteMiniCompilerContext = getViteMiniCompilerContext;
|
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.16",
|
|
4
4
|
"description": "Taro runner utilities.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "types/index.d.ts",
|
|
@@ -19,7 +19,13 @@
|
|
|
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.16",
|
|
23
|
+
"@tarojs/taro": "3.7.0-alpha.16"
|
|
24
|
+
},
|
|
25
|
+
"peerDependenciesMeta": {
|
|
26
|
+
"rollup": {
|
|
27
|
+
"optional": true
|
|
28
|
+
}
|
|
23
29
|
},
|
|
24
30
|
"scripts": {
|
|
25
31
|
"build": "tsc",
|
package/types/vite.d.ts
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import type { ViteH5CompilerContext, ViteMiniCompilerContext } from '@tarojs/taro/types/compile/viteCompilerContext';
|
|
2
|
+
import type { PluginContext } from 'rollup';
|
|
3
|
+
export declare function getViteH5CompilerContext(rollupPluginContext: PluginContext): Promise<ViteH5CompilerContext | undefined>;
|
|
4
|
+
export declare function getViteMiniCompilerContext(rollupPluginContext: PluginContext): ViteMiniCompilerContext | undefined;
|