@tarojs/runner-utils 4.1.12-beta.8 → 4.2.0-beta.0

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.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { ViteH5CompilerContext, ViteHarmonyCompilerContext, ViteMiniCompilerContext } from '@tarojs/taro/types/compile/viteCompilerContext';
2
2
  import type { PluginContext } from 'rollup';
3
3
  export declare function getViteH5CompilerContext(rollupPluginContext: PluginContext): Promise<ViteH5CompilerContext | void>;
4
- export declare function getViteHarmonyCompilerContext(rollupPluginContext: PluginContext): ViteHarmonyCompilerContext | void;
4
+ export declare function getViteHarmonyCompilerContext(rollupPluginContext: PluginContext): Promise<ViteHarmonyCompilerContext | void>;
5
5
  export declare function getViteMiniCompilerContext(rollupPluginContext: PluginContext): ViteMiniCompilerContext | void;
package/dist/vite.js CHANGED
@@ -22,9 +22,13 @@ function getViteH5CompilerContext(rollupPluginContext) {
22
22
  }
23
23
  exports.getViteH5CompilerContext = getViteH5CompilerContext;
24
24
  function getViteHarmonyCompilerContext(rollupPluginContext) {
25
- const info = rollupPluginContext.getModuleInfo(constant_1.VITE_COMPILER_LABEL);
26
- const compiler = info === null || info === void 0 ? void 0 : info.meta.viteCompilerContext;
27
- return compiler;
25
+ return __awaiter(this, void 0, void 0, function* () {
26
+ const info = process.env.NODE_ENV === 'production'
27
+ ? rollupPluginContext.getModuleInfo(constant_1.VITE_COMPILER_LABEL)
28
+ : yield rollupPluginContext.load({ id: constant_1.VITE_COMPILER_LABEL });
29
+ const compiler = info === null || info === void 0 ? void 0 : info.meta.viteCompilerContext;
30
+ return compiler;
31
+ });
28
32
  }
29
33
  exports.getViteHarmonyCompilerContext = getViteHarmonyCompilerContext;
30
34
  function getViteMiniCompilerContext(rollupPluginContext) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tarojs/runner-utils",
3
- "version": "4.1.12-beta.8",
3
+ "version": "4.2.0-beta.0",
4
4
  "description": "Taro runner utilities.",
5
5
  "author": "O2Team",
6
6
  "license": "MIT",
@@ -22,10 +22,10 @@
22
22
  "dependencies": {
23
23
  "rollup": "^3.29.4",
24
24
  "scss-bundle": "^3.1.2",
25
- "@tarojs/helper": "4.1.12-beta.8"
25
+ "@tarojs/helper": "4.2.0-beta.0"
26
26
  },
27
27
  "devDependencies": {
28
- "@tarojs/taro": "4.1.12-beta.8"
28
+ "@tarojs/taro": "4.2.0-beta.0"
29
29
  },
30
30
  "scripts": {
31
31
  "prod": "pnpm run build",