vite-plugin-pages2 0.33.1 → 0.34.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.
Files changed (2) hide show
  1. package/dist/index.js +8 -8
  2. package/package.json +132 -136
package/dist/index.js CHANGED
@@ -40,8 +40,8 @@ var countSlashRE = /\//g;
40
40
  var replaceIndexRE = /\/?index$/;
41
41
 
42
42
  // src/context.ts
43
- import { join as join2, resolve as resolve3 } from "node:path";
44
- import process2 from "node:process";
43
+ import { join as join2, resolve as resolve3 } from "path";
44
+ import process2 from "process";
45
45
 
46
46
  // node_modules/.pnpm/@antfu+utils@9.2.0/node_modules/@antfu/utils/dist/index.mjs
47
47
  function toArray(array) {
@@ -54,12 +54,12 @@ function slash(str) {
54
54
  var VOID = Symbol("p-void");
55
55
 
56
56
  // src/files.ts
57
- import { join } from "node:path";
57
+ import { join } from "path";
58
58
  import { globSync } from "tinyglobby";
59
59
 
60
60
  // src/utils.ts
61
- import { resolve, win32 } from "node:path";
62
- import { URLSearchParams } from "node:url";
61
+ import { resolve, win32 } from "path";
62
+ import { URLSearchParams } from "url";
63
63
  import Debug from "debug";
64
64
  import micromatch from "micromatch";
65
65
  var debug = {
@@ -232,8 +232,8 @@ function getPageFiles(path, options, pageOptions) {
232
232
  }
233
233
 
234
234
  // src/options.ts
235
- import { resolve as resolve2 } from "node:path";
236
- import process from "node:process";
235
+ import { resolve as resolve2 } from "path";
236
+ import process from "process";
237
237
 
238
238
  // src/stringify.ts
239
239
  var componentRE = /"(?:component|element)":("(.*?)")/g;
@@ -475,7 +475,7 @@ import { dequal } from "dequal";
475
475
  import colors from "picocolors";
476
476
 
477
477
  // src/customBlock.ts
478
- import fs from "node:fs";
478
+ import fs from "fs";
479
479
  import extractComments from "extract-comments";
480
480
  import JSON5 from "json5";
481
481
  import { importModule } from "local-pkg";
package/package.json CHANGED
@@ -1,136 +1,132 @@
1
- {
2
- "name": "vite-plugin-pages2",
3
- "type": "module",
4
- "version": "0.33.1",
5
- "packageManager": "pnpm@10.9.0",
6
- "description": "File system base vue-router plugin for Vite",
7
- "author": "wuc656 <wuc656@gmail.com>, hannoeru <me@hanlee.co>",
8
- "license": "MIT",
9
- "homepage": "https://github.com/wuc656/vite-plugin-pages",
10
- "repository": {
11
- "type": "git",
12
- "url": "git+https://github.com/wuc656/vite-plugin-pages.git"
13
- },
14
- "bugs": "https://github.com/wuc656/vite-plugin-pages/issues",
15
- "keywords": [
16
- "vite",
17
- "vue",
18
- "vue-router",
19
- "react",
20
- "react-router",
21
- "solid-js",
22
- "@solidjs/router",
23
- "file-system-based",
24
- "routing"
25
- ],
26
- "exports": {
27
- ".": {
28
- "types": "./dist/index.d.ts",
29
- "import": "./dist/index.js",
30
- "require": "./dist/index.cjs"
31
- },
32
- "./client": {
33
- "types": "./client.d.ts"
34
- },
35
- "./client-react": {
36
- "types": "./client-react.d.ts"
37
- },
38
- "./client-solid": {
39
- "types": "./client-solid.d.ts"
40
- }
41
- },
42
- "main": "dist/index.js",
43
- "types": "dist/index.d.ts",
44
- "files": [
45
- "LICENSE",
46
- "client-react.d.ts",
47
- "client-solid.d.ts",
48
- "client.d.ts",
49
- "dist"
50
- ],
51
- "scripts": {
52
- "dev": "npm run build -- --watch --ignore-watch examples",
53
- "build": "tsup",
54
- "play": "pnpm --filter vue dev",
55
- "play:react": "pnpm --filter react dev",
56
- "prepublishOnly": "npm run build",
57
- "release": "bumpp --commit --tag --push && npm publish",
58
- "publish:ci": "esno scripts/publish.ts",
59
- "test": "vitest",
60
- "test:e2e": "vitest -c vitest.config.e2e.ts",
61
- "test:ui": "vitest --ui",
62
- "lint": "eslint .",
63
- "lint:fix": "eslint . --fix",
64
- "type-check": "tsc --noEmit"
65
- },
66
- "peerDependencies": {
67
- "@vue/compiler-sfc": "^2.7.0 || ^3.0.0",
68
- "vite": "^2.0.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0 || ^6.0.0"
69
- },
70
- "peerDependenciesMeta": {
71
- "@solidjs/router": {
72
- "optional": true
73
- },
74
- "@vue/compiler-sfc": {
75
- "optional": true
76
- },
77
- "react-router": {
78
- "optional": true
79
- },
80
- "vue-router": {
81
- "optional": true
82
- }
83
- },
84
- "dependencies": {
85
- "@types/debug": "^4.1.12",
86
- "debug": "^4.4.0",
87
- "dequal": "^2.0.3",
88
- "extract-comments": "^1.1.0",
89
- "json5": "^2.2.3",
90
- "local-pkg": "^1.1.1",
91
- "micromatch": "^4.0.8",
92
- "picocolors": "^1.1.1",
93
- "tinyglobby": "^0.2.13",
94
- "yaml": "^2.7.1"
95
- },
96
- "devDependencies": {
97
- "@antfu/eslint-config": "^4.12.0",
98
- "@antfu/utils": "^9.2.0",
99
- "@solidjs/router": "^0.15.3",
100
- "@types/micromatch": "^4.0.9",
101
- "@types/node": "^22.14.1",
102
- "@vitest/ui": "^3.1.2",
103
- "@vue/compiler-sfc": "^3.5.13",
104
- "bumpp": "^10.1.0",
105
- "eslint": "^9.25.1",
106
- "esno": "^4.8.0",
107
- "playwright": "^1.52.0",
108
- "react": "^19.1.0",
109
- "react-router": "^7.5.1",
110
- "solid-js": "^1.9.5",
111
- "tsup": "^8.4.0",
112
- "typescript": "^5.8.3",
113
- "vite": "^6.3.2",
114
- "vitest": "^3.1.2",
115
- "vue": "^3.5.13",
116
- "vue-router": "^4.5.0"
117
- },
118
- "pnpm": {
119
- "peerDependencyRules": {
120
- "allowedVersions": {
121
- "eslint": "*"
122
- }
123
- },
124
- "overrides": {
125
- "array-flatten": "npm:@nolyfill/array-flatten@^1",
126
- "is-core-module": "npm:@nolyfill/is-core-module@^1",
127
- "safe-buffer": "npm:@nolyfill/safe-buffer@^1",
128
- "safer-buffer": "npm:@nolyfill/safer-buffer@^1",
129
- "side-channel": "npm:@nolyfill/side-channel@^1"
130
- },
131
- "onlyBuiltDependencies": [
132
- "esbuild",
133
- "unrs-resolver"
134
- ]
135
- }
136
- }
1
+ {
2
+ "name": "vite-plugin-pages2",
3
+ "type": "module",
4
+ "version": "0.34.0",
5
+ "packageManager": "pnpm@10.12.3",
6
+ "description": "File system base vue-router plugin for Vite",
7
+ "author": "wuc656 <wuc656@gmail.com>, hannoeru <me@hanlee.co>",
8
+ "license": "MIT",
9
+ "homepage": "https://github.com/wuc656/vite-plugin-pages",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/wuc656/vite-plugin-pages.git"
13
+ },
14
+ "bugs": "https://github.com/wuc656/vite-plugin-pages/issues",
15
+ "keywords": [
16
+ "vite",
17
+ "vue",
18
+ "vue-router",
19
+ "react",
20
+ "react-router",
21
+ "solid-js",
22
+ "@solidjs/router",
23
+ "file-system-based",
24
+ "routing"
25
+ ],
26
+ "exports": {
27
+ ".": {
28
+ "types": "./dist/index.d.ts",
29
+ "import": "./dist/index.js",
30
+ "require": "./dist/index.cjs"
31
+ },
32
+ "./client": {
33
+ "types": "./client.d.ts"
34
+ },
35
+ "./client-react": {
36
+ "types": "./client-react.d.ts"
37
+ },
38
+ "./client-solid": {
39
+ "types": "./client-solid.d.ts"
40
+ }
41
+ },
42
+ "main": "dist/index.js",
43
+ "types": "dist/index.d.ts",
44
+ "files": [
45
+ "LICENSE",
46
+ "client-react.d.ts",
47
+ "client-solid.d.ts",
48
+ "client.d.ts",
49
+ "dist"
50
+ ],
51
+ "scripts": {
52
+ "dev": "npm run build -- --watch --ignore-watch examples",
53
+ "build": "tsup",
54
+ "play": "pnpm --filter vue dev",
55
+ "play:react": "pnpm --filter react dev",
56
+ "prepublishOnly": "npm run build",
57
+ "release": "bumpp --commit --tag --push && npm publish",
58
+ "publish:ci": "esno scripts/publish.ts",
59
+ "test": "vitest",
60
+ "test:e2e": "vitest -c vitest.config.e2e.ts",
61
+ "test:ui": "vitest --ui",
62
+ "lint": "eslint .",
63
+ "lint:fix": "eslint . --fix",
64
+ "type-check": "tsc --noEmit"
65
+ },
66
+ "peerDependencies": {
67
+ "@vue/compiler-sfc": "^2.7.0 || ^3.0.0",
68
+ "vite": "^2.0.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0"
69
+ },
70
+ "peerDependenciesMeta": {
71
+ "@solidjs/router": {
72
+ "optional": true
73
+ },
74
+ "@vue/compiler-sfc": {
75
+ "optional": true
76
+ },
77
+ "react-router": {
78
+ "optional": true
79
+ },
80
+ "vue-router": {
81
+ "optional": true
82
+ }
83
+ },
84
+ "dependencies": {
85
+ "@types/debug": "^4.1.12",
86
+ "debug": "^4.4.1",
87
+ "dequal": "^2.0.3",
88
+ "extract-comments": "^1.1.0",
89
+ "json5": "^2.2.3",
90
+ "local-pkg": "^1.1.1",
91
+ "micromatch": "^4.0.8",
92
+ "picocolors": "^1.1.1",
93
+ "tinyglobby": "^0.2.14",
94
+ "yaml": "^2.8.0"
95
+ },
96
+ "devDependencies": {
97
+ "@antfu/eslint-config": "^4.16.1",
98
+ "@antfu/utils": "^9.2.0",
99
+ "@solidjs/router": "^0.15.3",
100
+ "@types/micromatch": "^4.0.9",
101
+ "@types/node": "^24.0.4",
102
+ "@vitest/ui": "^3.2.4",
103
+ "@vue/compiler-sfc": "^3.5.17",
104
+ "bumpp": "^10.2.0",
105
+ "eslint": "^9.29.0",
106
+ "esno": "^4.8.0",
107
+ "playwright": "^1.53.1",
108
+ "react": "^19.1.0",
109
+ "react-router": "^7.6.2",
110
+ "solid-js": "^1.9.7",
111
+ "tsup": "^8.5.0",
112
+ "typescript": "^5.8.3",
113
+ "vite": "^7.0.0",
114
+ "vitest": "^3.2.4",
115
+ "vue": "^3.5.17",
116
+ "vue-router": "^4.5.1"
117
+ },
118
+ "pnpm": {
119
+ "peerDependencyRules": {
120
+ "allowedVersions": {
121
+ "eslint": "*"
122
+ }
123
+ },
124
+ "overrides": {
125
+ "array-flatten": "npm:@nolyfill/array-flatten@^1.0.44",
126
+ "is-core-module": "npm:@nolyfill/is-core-module@^1.0.39",
127
+ "safe-buffer": "npm:@nolyfill/safe-buffer@^1.0.44",
128
+ "safer-buffer": "npm:@nolyfill/safer-buffer@^1.0.44",
129
+ "side-channel": "npm:@nolyfill/side-channel@^1.0.44"
130
+ }
131
+ }
132
+ }