weapp-vite 6.10.1 → 6.10.2

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.
@@ -1,6 +1,6 @@
1
- import { n as getCompilerContext } from "./createContext-DUM1udUE.mjs";
1
+ import { n as getCompilerContext } from "./createContext-Dzy3vlIP.mjs";
2
2
  import "./logger-gutcwWKE.mjs";
3
- import "./file-DT8nNo0D.mjs";
3
+ import "./file-DLpJ9tlX.mjs";
4
4
  //#region src/auto-routes.ts
5
5
  const ROUTE_RUNTIME_OVERRIDE_KEY = Symbol.for("weapp-vite.route-runtime");
6
6
  function createGetter(resolver) {
package/dist/cli.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { a as DEFAULT_MP_PLATFORM, c as createSharedBuildConfig, d as checkRuntime, f as getProjectConfigFileName, i as formatBytes, l as SHARED_CHUNK_VIRTUAL_PREFIX, m as isPathInside, o as normalizeMiniPlatform, p as createCjsConfigLoadError, s as resolveMiniPlatform, t as createCompilerContext, u as resolveWeappConfigFile } from "./createContext-DUM1udUE.mjs";
1
+ import { a as DEFAULT_MP_PLATFORM, c as createSharedBuildConfig, d as checkRuntime, f as getProjectConfigFileName, i as formatBytes, l as SHARED_CHUNK_VIRTUAL_PREFIX, m as isPathInside, o as normalizeMiniPlatform, p as createCjsConfigLoadError, s as resolveMiniPlatform, t as createCompilerContext, u as resolveWeappConfigFile } from "./createContext-Dzy3vlIP.mjs";
2
2
  import { r as logger_default, t as colors } from "./logger-gutcwWKE.mjs";
3
- import { f as VERSION } from "./file-DT8nNo0D.mjs";
3
+ import { f as VERSION } from "./file-DLpJ9tlX.mjs";
4
4
  import { resolveWeappMcpConfig, startWeappViteMcpServer } from "./mcp.mjs";
5
5
  import { defu } from "@weapp-core/shared";
6
6
  import path, { posix } from "pathe";
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-twds-ZHy.mjs";
2
2
  import { n as applyWeappViteHostMeta } from "./pluginHost-SJdl15d3.mjs";
3
3
  import { n as configureLogger, r as logger_default } from "./logger-gutcwWKE.mjs";
4
- import { _ as vueExtensions, a as findJsEntry, c as findVueEntry, d as touch, g as templateExtensions, h as supportedCssLangs, i as findCssEntry, l as isJsOrTs, m as jsExtensions, n as extractConfigFromVue, o as findJsonEntry, p as configExtensions, s as findTemplateEntry, t as changeFileExtension, u as isTemplate } from "./file-DT8nNo0D.mjs";
4
+ import { _ as vueExtensions, a as findJsEntry, c as findVueEntry, d as touch, g as templateExtensions, h as supportedCssLangs, i as findCssEntry, l as isJsOrTs, m as jsExtensions, n as extractConfigFromVue, o as findJsonEntry, p as configExtensions, s as findTemplateEntry, t as changeFileExtension, u as isTemplate } from "./file-DLpJ9tlX.mjs";
5
5
  import { createRequire, isBuiltin } from "node:module";
6
6
  import { addExtension, defu, get, isEmptyObject, isObject, objectHash, removeExtension, removeExtensionDeep, set } from "@weapp-core/shared";
7
7
  import { LRUCache } from "lru-cache";
@@ -9382,9 +9382,9 @@ function prepareNormalizedEntries(options) {
9382
9382
  return normalizedEntries;
9383
9383
  }
9384
9384
  async function emitEntryOutput(options) {
9385
- const { pluginCtx, id, type, json, jsonPath, isPluginBuild, normalizedEntries, pluginResolvedRecords, pluginJsonPathForRegistration, pluginJsonForRegistration, resolveEntriesWithCache, configService, resolvedEntryMap, loadedEntrySet, dirtyEntrySet, emitEntriesChunks, registerJsonAsset, existsCache, pathExistsTtlMs, debug, relativeCwdId, getTime } = options;
9385
+ const { pluginCtx, id, type, json, jsonPath, isPluginBuild, normalizedEntries, pluginResolvedRecords, pluginJsonPathForRegistration, pluginJsonForRegistration, resolveEntriesWithCache, entryResolveRoot, configService, resolvedEntryMap, loadedEntrySet, dirtyEntrySet, emitEntriesChunks, registerJsonAsset, existsCache, pathExistsTtlMs, debug, relativeCwdId, getTime } = options;
9386
9386
  const shouldSkipEntries = Boolean(options.skipEntries);
9387
- const resolvedIds = shouldSkipEntries ? [] : normalizedEntries.length ? await resolveEntriesWithCache(pluginCtx, normalizedEntries, configService.absoluteSrcRoot) : [];
9387
+ const resolvedIds = shouldSkipEntries ? [] : normalizedEntries.length ? await resolveEntriesWithCache(pluginCtx, normalizedEntries, entryResolveRoot) : [];
9388
9388
  debug?.(`resolvedIds ${relativeCwdId} 耗时 ${getTime()}`);
9389
9389
  const pendingResolvedIds = [];
9390
9390
  const combinedResolved = shouldSkipEntries ? [] : pluginResolvedRecords ? isPluginBuild ? pluginResolvedRecords : [...resolvedIds, ...pluginResolvedRecords] : resolvedIds;
@@ -9684,6 +9684,7 @@ function createEntryLoader(options) {
9684
9684
  extendedLibManager,
9685
9685
  entryType: entryTypeOverride
9686
9686
  });
9687
+ const entryResolveRoot = isPluginBuild && configService.absolutePluginRoot && isPathInside(configService.absolutePluginRoot, id) ? configService.absolutePluginRoot : configService.absoluteSrcRoot;
9687
9688
  const result = await emitEntryOutput({
9688
9689
  pluginCtx: this,
9689
9690
  id,
@@ -9696,6 +9697,7 @@ function createEntryLoader(options) {
9696
9697
  pluginJsonPathForRegistration,
9697
9698
  pluginJsonForRegistration,
9698
9699
  resolveEntriesWithCache: entryResolver.resolveEntriesWithCache,
9700
+ entryResolveRoot,
9699
9701
  configService,
9700
9702
  resolvedEntryMap,
9701
9703
  loadedEntrySet,
@@ -15871,7 +15873,7 @@ function createScanService(ctx) {
15871
15873
  let vueAppPath;
15872
15874
  if (!appEntryPath) vueAppPath = await findVueEntry(appBasename);
15873
15875
  if (!appConfigFile && vueAppPath) {
15874
- const { extractConfigFromVue } = await import("./file-DT8nNo0D.mjs").then((n) => n.r);
15876
+ const { extractConfigFromVue } = await import("./file-DLpJ9tlX.mjs").then((n) => n.r);
15875
15877
  configFromVue = await extractConfigFromVue(vueAppPath);
15876
15878
  if (configFromVue) appConfigFile = vueAppPath;
15877
15879
  }
@@ -78,7 +78,7 @@ function resolveAutoRoutesMacroImportPath() {
78
78
  }
79
79
  async function resolveAutoRoutesInlineSnapshot() {
80
80
  try {
81
- const { getCompilerContext } = await import("./createContext-DUM1udUE.mjs").then((n) => n.r);
81
+ const { getCompilerContext } = await import("./createContext-Dzy3vlIP.mjs").then((n) => n.r);
82
82
  const compilerContext = getCompilerContext();
83
83
  const service = compilerContext.autoRoutesService;
84
84
  const reference = service?.getReference?.();
package/dist/index.mjs CHANGED
@@ -1,9 +1,9 @@
1
1
  import { defineAppJson, defineComponentJson, definePageJson, defineSitemapJson, defineThemeJson } from "./json.mjs";
2
2
  import { a as resolveWeappViteHostMeta, i as isWeappViteHost, n as applyWeappViteHostMeta, r as createWeappViteHostMeta, t as WEAPP_VITE_HOST_NAME } from "./pluginHost-SJdl15d3.mjs";
3
3
  import { defineConfig } from "./config.mjs";
4
- import { t as createCompilerContext } from "./createContext-DUM1udUE.mjs";
4
+ import { t as createCompilerContext } from "./createContext-Dzy3vlIP.mjs";
5
5
  import "./logger-gutcwWKE.mjs";
6
- import "./file-DT8nNo0D.mjs";
6
+ import "./file-DLpJ9tlX.mjs";
7
7
  import { defineEmits, defineProps } from "./runtime.mjs";
8
8
  import { createWevuComponent } from "wevu";
9
9
  export { WEAPP_VITE_HOST_NAME, applyWeappViteHostMeta, createCompilerContext, createWeappViteHostMeta, createWevuComponent, defineAppJson, defineComponentJson, defineConfig, defineEmits, definePageJson, defineProps, defineSitemapJson, defineThemeJson, isWeappViteHost, resolveWeappViteHostMeta };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "weapp-vite",
3
3
  "type": "module",
4
- "version": "6.10.1",
4
+ "version": "6.10.2",
5
5
  "description": "weapp-vite 一个现代化的小程序打包工具",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -117,7 +117,7 @@
117
117
  "@weapp-core/logger": "3.1.1",
118
118
  "@weapp-core/schematics": "6.0.4",
119
119
  "@weapp-core/shared": "3.0.2",
120
- "@weapp-vite/ast": "6.10.1",
120
+ "@weapp-vite/ast": "6.10.2",
121
121
  "@weapp-vite/mcp": "1.1.1",
122
122
  "@weapp-vite/volar": "2.0.7",
123
123
  "@weapp-vite/web": "1.3.5",
@@ -125,7 +125,7 @@
125
125
  "rolldown-require": "2.0.8",
126
126
  "vite-plugin-performance": "2.0.1",
127
127
  "weapp-ide-cli": "5.1.1",
128
- "wevu": "6.10.1"
128
+ "wevu": "6.10.2"
129
129
  },
130
130
  "publishConfig": {
131
131
  "access": "public",