@uni-helper/vite-plugin-uni-pages 0.1.9 → 0.2.1
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 +2 -0
- package/dist/index.cjs +4 -6
- package/dist/index.mjs +4 -6
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -19,6 +19,7 @@ pnpm i -D @uni-helper/vite-plugin-uni-pages
|
|
|
19
19
|
import { defineConfig } from 'vite'
|
|
20
20
|
import Uni from '@dcloudio/vite-plugin-uni'
|
|
21
21
|
import UniPages from '@uni-helper/vite-plugin-uni-pages'
|
|
22
|
+
|
|
22
23
|
// It is recommended to put it in front of Uni
|
|
23
24
|
export default defineConfig({
|
|
24
25
|
plugins: [UniPages(), Uni()],
|
|
@@ -75,6 +76,7 @@ Import the virtual module to access the metadata of all pages
|
|
|
75
76
|
```ts
|
|
76
77
|
/// <reference types="@uni-helper/vite-plugin-uni-pages/client" />
|
|
77
78
|
import { pages } from 'virtual:uni-pages'
|
|
79
|
+
|
|
78
80
|
console.log(pages)
|
|
79
81
|
```
|
|
80
82
|
|
package/dist/index.cjs
CHANGED
|
@@ -370,13 +370,11 @@ class PageContext {
|
|
|
370
370
|
return false;
|
|
371
371
|
}
|
|
372
372
|
});
|
|
373
|
-
if (isFoundHome)
|
|
373
|
+
if (isFoundHome)
|
|
374
374
|
return true;
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
});
|
|
379
|
-
}
|
|
375
|
+
this.logger?.warn('No home page found, check the configuration of pages.config.ts, or add the `homePage` option to UniPages in vite.config.js, or add `type="home"` to the routeBlock of your vue page.', {
|
|
376
|
+
timestamp: true
|
|
377
|
+
});
|
|
380
378
|
}
|
|
381
379
|
async mergePageMetaData() {
|
|
382
380
|
const pageMetaData = await this.parsePages(this.pagesPath, this.pagesGlobConfig?.pages);
|
package/dist/index.mjs
CHANGED
|
@@ -356,13 +356,11 @@ class PageContext {
|
|
|
356
356
|
return false;
|
|
357
357
|
}
|
|
358
358
|
});
|
|
359
|
-
if (isFoundHome)
|
|
359
|
+
if (isFoundHome)
|
|
360
360
|
return true;
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
});
|
|
365
|
-
}
|
|
361
|
+
this.logger?.warn('No home page found, check the configuration of pages.config.ts, or add the `homePage` option to UniPages in vite.config.js, or add `type="home"` to the routeBlock of your vue page.', {
|
|
362
|
+
timestamp: true
|
|
363
|
+
});
|
|
366
364
|
}
|
|
367
365
|
async mergePageMetaData() {
|
|
368
366
|
const pageMetaData = await this.parsePages(this.pagesPath, this.pagesGlobConfig?.pages);
|
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.1
|
|
4
|
+
"version": "0.2.1",
|
|
5
5
|
"description": "File system based routing for uni-app applications using Vite",
|
|
6
6
|
"author": "KeJun",
|
|
7
7
|
"license": "MIT",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@antfu/utils": "^0.7.2",
|
|
47
47
|
"@types/debug": "^4.1.7",
|
|
48
|
-
"@types/node": "^18.16.
|
|
48
|
+
"@types/node": "^18.16.8"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|
|
51
51
|
"build": "unbuild",
|