weapp-vite 1.7.3 → 1.7.5

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.
@@ -2,7 +2,7 @@ import {
2
2
  __commonJS,
3
3
  __toESM,
4
4
  init_esm_shims
5
- } from "./chunk-V57P47YG.mjs";
5
+ } from "./chunk-F57UPGHA.mjs";
6
6
 
7
7
  // ../../node_modules/.pnpm/debounce@2.2.0/node_modules/debounce/index.js
8
8
  var require_debounce = __commonJS({
@@ -95,7 +95,7 @@ var logger_default = logger;
95
95
  init_esm_shims();
96
96
 
97
97
  // package.json
98
- var version = "1.7.3";
98
+ var version = "1.7.5";
99
99
 
100
100
  // src/constants.ts
101
101
  var VERSION = version;
@@ -1355,7 +1355,13 @@ var CompilerContext = class {
1355
1355
  entries: this.entries
1356
1356
  };
1357
1357
  debug2?.("scanComponentEntry start", componentEntry);
1358
- const baseName = removeExtension2(path5.resolve(dirname, componentEntry));
1358
+ let baseName = removeExtension2(path5.resolve(dirname, componentEntry));
1359
+ if (await fs5.exists(baseName)) {
1360
+ const stat = await fs5.stat(baseName);
1361
+ if (stat.isDirectory()) {
1362
+ baseName = path5.join(baseName, "index");
1363
+ }
1364
+ }
1359
1365
  const jsEntry = await findJsEntry(baseName);
1360
1366
  const partialEntry = {
1361
1367
  path: jsEntry
@@ -27,9 +27,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
27
  mod
28
28
  ));
29
29
 
30
- // ../../node_modules/.pnpm/tsup@8.3.5_@swc+core@1.9.1_jiti@2.3.1_postcss@8.4.47_tsx@4.19.2_typescript@5.6.3_yaml@2.6.0/node_modules/tsup/assets/esm_shims.js
30
+ // ../../node_modules/.pnpm/tsup@8.3.5_@swc+core@1.9.2_jiti@2.4.0_postcss@8.4.49_tsx@4.19.2_typescript@5.6.3_yaml@2.6.0/node_modules/tsup/assets/esm_shims.js
31
31
  var init_esm_shims = __esm({
32
- "../../node_modules/.pnpm/tsup@8.3.5_@swc+core@1.9.1_jiti@2.3.1_postcss@8.4.47_tsx@4.19.2_typescript@5.6.3_yaml@2.6.0/node_modules/tsup/assets/esm_shims.js"() {
32
+ "../../node_modules/.pnpm/tsup@8.3.5_@swc+core@1.9.2_jiti@2.4.0_postcss@8.4.49_tsx@4.19.2_typescript@5.6.3_yaml@2.6.0/node_modules/tsup/assets/esm_shims.js"() {
33
33
  "use strict";
34
34
  }
35
35
  });
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  init_esm_shims
3
- } from "./chunk-V57P47YG.mjs";
3
+ } from "./chunk-F57UPGHA.mjs";
4
4
 
5
5
  // src/config.ts
6
6
  init_esm_shims();
package/dist/cli.cjs CHANGED
@@ -28,10 +28,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  mod
29
29
  ));
30
30
 
31
- // ../../node_modules/.pnpm/tsup@8.3.5_@swc+core@1.9.1_jiti@2.3.1_postcss@8.4.47_tsx@4.19.2_typescript@5.6.3_yaml@2.6.0/node_modules/tsup/assets/cjs_shims.js
31
+ // ../../node_modules/.pnpm/tsup@8.3.5_@swc+core@1.9.2_jiti@2.4.0_postcss@8.4.49_tsx@4.19.2_typescript@5.6.3_yaml@2.6.0/node_modules/tsup/assets/cjs_shims.js
32
32
  var getImportMetaUrl, importMetaUrl;
33
33
  var init_cjs_shims = __esm({
34
- "../../node_modules/.pnpm/tsup@8.3.5_@swc+core@1.9.1_jiti@2.3.1_postcss@8.4.47_tsx@4.19.2_typescript@5.6.3_yaml@2.6.0/node_modules/tsup/assets/cjs_shims.js"() {
34
+ "../../node_modules/.pnpm/tsup@8.3.5_@swc+core@1.9.2_jiti@2.4.0_postcss@8.4.49_tsx@4.19.2_typescript@5.6.3_yaml@2.6.0/node_modules/tsup/assets/cjs_shims.js"() {
35
35
  "use strict";
36
36
  getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
37
37
  importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
@@ -132,7 +132,7 @@ var import_weapp_ide_cli = require("weapp-ide-cli");
132
132
  init_cjs_shims();
133
133
 
134
134
  // package.json
135
- var version = "1.7.3";
135
+ var version = "1.7.5";
136
136
 
137
137
  // src/constants.ts
138
138
  var VERSION = version;
@@ -1400,7 +1400,13 @@ var CompilerContext = class {
1400
1400
  entries: this.entries
1401
1401
  };
1402
1402
  debug2?.("scanComponentEntry start", componentEntry);
1403
- const baseName = (0, import_shared5.removeExtension)(import_pathe5.default.resolve(dirname, componentEntry));
1403
+ let baseName = (0, import_shared5.removeExtension)(import_pathe5.default.resolve(dirname, componentEntry));
1404
+ if (await import_fs_extra5.default.exists(baseName)) {
1405
+ const stat = await import_fs_extra5.default.stat(baseName);
1406
+ if (stat.isDirectory()) {
1407
+ baseName = import_pathe5.default.join(baseName, "index");
1408
+ }
1409
+ }
1404
1410
  const jsEntry = await findJsEntry(baseName);
1405
1411
  const partialEntry = {
1406
1412
  path: jsEntry
package/dist/cli.mjs CHANGED
@@ -2,11 +2,11 @@ import {
2
2
  VERSION,
3
3
  createCompilerContext,
4
4
  logger_default
5
- } from "./chunk-GK2DYKAY.mjs";
6
- import "./chunk-25DMVYND.mjs";
5
+ } from "./chunk-CIZZU3P3.mjs";
6
+ import "./chunk-NWYDKKXS.mjs";
7
7
  import {
8
8
  init_esm_shims
9
- } from "./chunk-V57P47YG.mjs";
9
+ } from "./chunk-F57UPGHA.mjs";
10
10
 
11
11
  // src/cli.ts
12
12
  init_esm_shims();
package/dist/config.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  defineConfig
3
- } from "./chunk-25DMVYND.mjs";
4
- import "./chunk-V57P47YG.mjs";
3
+ } from "./chunk-NWYDKKXS.mjs";
4
+ import "./chunk-F57UPGHA.mjs";
5
5
  export {
6
6
  defineConfig
7
7
  };
package/dist/index.cjs CHANGED
@@ -33,10 +33,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
33
33
  ));
34
34
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
35
35
 
36
- // ../../node_modules/.pnpm/tsup@8.3.5_@swc+core@1.9.1_jiti@2.3.1_postcss@8.4.47_tsx@4.19.2_typescript@5.6.3_yaml@2.6.0/node_modules/tsup/assets/cjs_shims.js
36
+ // ../../node_modules/.pnpm/tsup@8.3.5_@swc+core@1.9.2_jiti@2.4.0_postcss@8.4.49_tsx@4.19.2_typescript@5.6.3_yaml@2.6.0/node_modules/tsup/assets/cjs_shims.js
37
37
  var getImportMetaUrl, importMetaUrl;
38
38
  var init_cjs_shims = __esm({
39
- "../../node_modules/.pnpm/tsup@8.3.5_@swc+core@1.9.1_jiti@2.3.1_postcss@8.4.47_tsx@4.19.2_typescript@5.6.3_yaml@2.6.0/node_modules/tsup/assets/cjs_shims.js"() {
39
+ "../../node_modules/.pnpm/tsup@8.3.5_@swc+core@1.9.2_jiti@2.4.0_postcss@8.4.49_tsx@4.19.2_typescript@5.6.3_yaml@2.6.0/node_modules/tsup/assets/cjs_shims.js"() {
40
40
  "use strict";
41
41
  getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
42
42
  importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
@@ -1400,7 +1400,13 @@ var CompilerContext = class {
1400
1400
  entries: this.entries
1401
1401
  };
1402
1402
  debug2?.("scanComponentEntry start", componentEntry);
1403
- const baseName = (0, import_shared5.removeExtension)(import_pathe5.default.resolve(dirname, componentEntry));
1403
+ let baseName = (0, import_shared5.removeExtension)(import_pathe5.default.resolve(dirname, componentEntry));
1404
+ if (await import_fs_extra5.default.exists(baseName)) {
1405
+ const stat = await import_fs_extra5.default.stat(baseName);
1406
+ if (stat.isDirectory()) {
1407
+ baseName = import_pathe5.default.join(baseName, "index");
1408
+ }
1409
+ }
1404
1410
  const jsEntry = await findJsEntry(baseName);
1405
1411
  const partialEntry = {
1406
1412
  path: jsEntry
package/dist/index.mjs CHANGED
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  CompilerContext,
3
3
  createCompilerContext
4
- } from "./chunk-GK2DYKAY.mjs";
5
- import "./chunk-25DMVYND.mjs";
4
+ } from "./chunk-CIZZU3P3.mjs";
5
+ import "./chunk-NWYDKKXS.mjs";
6
6
  import {
7
7
  init_esm_shims
8
- } from "./chunk-V57P47YG.mjs";
8
+ } from "./chunk-F57UPGHA.mjs";
9
9
 
10
10
  // src/index.ts
11
11
  init_esm_shims();
package/dist/json.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  init_esm_shims
3
- } from "./chunk-V57P47YG.mjs";
3
+ } from "./chunk-F57UPGHA.mjs";
4
4
 
5
5
  // src/json.ts
6
6
  init_esm_shims();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "weapp-vite",
3
3
  "type": "module",
4
- "version": "1.7.3",
4
+ "version": "1.7.5",
5
5
  "description": "weapp-vite 一个现代化的小程序打包工具",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -59,9 +59,6 @@
59
59
  "engines": {
60
60
  "node": ">=20.0.0"
61
61
  },
62
- "peerDependencies": {
63
- "vite": ">=2.6.0"
64
- },
65
62
  "dependencies": {
66
63
  "@babel/core": "^7.26.0",
67
64
  "@babel/preset-env": "^7.26.0",
@@ -79,12 +76,13 @@
79
76
  "pathe": "^1.1.2",
80
77
  "picomatch": "^4.0.2",
81
78
  "tsup": "^8.3.5",
82
- "vite-tsconfig-paths": "^5.1.0",
83
- "@weapp-core/init": "^1.1.8",
79
+ "vite": "^5.4.11",
80
+ "vite-tsconfig-paths": "^5.1.2",
81
+ "@weapp-core/init": "^1.1.9",
84
82
  "@weapp-core/logger": "^1.0.1",
83
+ "@weapp-core/schematics": "^1.0.5",
85
84
  "weapp-ide-cli": "^2.0.6",
86
- "@weapp-core/shared": "^1.0.4",
87
- "@weapp-core/schematics": "^1.0.5"
85
+ "@weapp-core/shared": "^1.0.4"
88
86
  },
89
87
  "publishConfig": {
90
88
  "access": "public",