@uni-helper/vite-plugin-uni-pages 0.2.18 → 0.2.19
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/README.md +1 -1
- package/dist/index.cjs +2 -1
- package/dist/index.mjs +2 -1
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -49,7 +49,7 @@ Now all pages will be found automatically!
|
|
|
49
49
|
Add route meta to the route by adding a `<route>` block to the SFC. This will be
|
|
50
50
|
directly added to the route after it is generated, and will override it.
|
|
51
51
|
|
|
52
|
-
You can
|
|
52
|
+
You can specify a parser to use using `<route lang="yaml">`, or set a default
|
|
53
53
|
parser using `routeBlockLang` option.
|
|
54
54
|
|
|
55
55
|
- **Supported parser:** JSON, JSON5, YAML
|
package/dist/index.cjs
CHANGED
|
@@ -486,7 +486,8 @@ class PageContext {
|
|
|
486
486
|
const subPageMaps = {};
|
|
487
487
|
const subPackages = this.pagesGlobConfig?.subPackages || [];
|
|
488
488
|
for (const [dir, pages] of Object.entries(this.subPagesPath)) {
|
|
489
|
-
const
|
|
489
|
+
const basePath = slash(path__default.join(this.options.root, this.options.outDir));
|
|
490
|
+
const root = slash(path__default.relative(basePath, dir));
|
|
490
491
|
const globPackage = subPackages?.find((v) => v.root === root);
|
|
491
492
|
subPageMaps[root] = await this.parsePages(pages, "sub", globPackage?.pages);
|
|
492
493
|
subPageMaps[root] = subPageMaps[root].map((page) => ({ ...page, path: slash(path__default.relative(root, page.path)) }));
|
package/dist/index.mjs
CHANGED
|
@@ -471,7 +471,8 @@ class PageContext {
|
|
|
471
471
|
const subPageMaps = {};
|
|
472
472
|
const subPackages = this.pagesGlobConfig?.subPackages || [];
|
|
473
473
|
for (const [dir, pages] of Object.entries(this.subPagesPath)) {
|
|
474
|
-
const
|
|
474
|
+
const basePath = slash(path.join(this.options.root, this.options.outDir));
|
|
475
|
+
const root = slash(path.relative(basePath, dir));
|
|
475
476
|
const globPackage = subPackages?.find((v) => v.root === root);
|
|
476
477
|
subPageMaps[root] = await this.parsePages(pages, "sub", globPackage?.pages);
|
|
477
478
|
subPageMaps[root] = subPageMaps[root].map((page) => ({ ...page, path: slash(path.relative(root, page.path)) }));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uni-helper/vite-plugin-uni-pages",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.19",
|
|
5
5
|
"description": "File system based routing for uni-app applications using Vite",
|
|
6
6
|
"author": "KeJun",
|
|
7
7
|
"license": "MIT",
|
|
@@ -37,20 +37,20 @@
|
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@uni-helper/uni-env": "^0.1.1",
|
|
40
|
-
"@vue/compiler-sfc": "^3.4.
|
|
40
|
+
"@vue/compiler-sfc": "^3.4.27",
|
|
41
41
|
"chokidar": "^3.6.0",
|
|
42
42
|
"debug": "^4.3.4",
|
|
43
43
|
"fast-glob": "^3.3.2",
|
|
44
44
|
"json5": "^2.2.3",
|
|
45
45
|
"lodash-unified": "^1.0.3",
|
|
46
|
-
"magic-string": "^0.30.
|
|
47
|
-
"unconfig": "^0.3.
|
|
48
|
-
"yaml": "^2.4.
|
|
46
|
+
"magic-string": "^0.30.10",
|
|
47
|
+
"unconfig": "^0.3.13",
|
|
48
|
+
"yaml": "^2.4.2"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@antfu/utils": "^0.7.
|
|
51
|
+
"@antfu/utils": "^0.7.8",
|
|
52
52
|
"@types/debug": "^4.1.12",
|
|
53
|
-
"@types/node": "^20.11
|
|
53
|
+
"@types/node": "^20.12.11"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
56
56
|
"build": "unbuild",
|