@vixt/uni 0.1.17 → 0.1.18
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/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.mjs +8 -2
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as vite from 'vite';
|
|
2
2
|
import * as _vixt_core from '@vixt/core';
|
|
3
3
|
import { PluginOptions, VixtOptions } from '@vixt/core';
|
|
4
|
-
import {
|
|
4
|
+
import { PluginOptions as PluginOptions$1 } from 'pinia-plugin-persistedstate';
|
|
5
5
|
import Uni from '@dcloudio/vite-plugin-uni';
|
|
6
6
|
import Pages from '@uni-helper/vite-plugin-uni-pages';
|
|
7
7
|
import Layouts from '@uni-helper/vite-plugin-uni-layouts';
|
|
@@ -27,8 +27,8 @@ declare module '@vixt/core' {
|
|
|
27
27
|
}
|
|
28
28
|
declare module '@vixt/core/client' {
|
|
29
29
|
interface VixtAppConfig {
|
|
30
|
-
/** https://github.com/
|
|
31
|
-
piniaPersistedState?:
|
|
30
|
+
/** https://github.com/prazdevs/pinia-plugin-persistedstate */
|
|
31
|
+
piniaPersistedState?: PluginOptions$1;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
declare const presetUni: _vixt_core.VixtModule<VixtOptions>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as vite from 'vite';
|
|
2
2
|
import * as _vixt_core from '@vixt/core';
|
|
3
3
|
import { PluginOptions, VixtOptions } from '@vixt/core';
|
|
4
|
-
import {
|
|
4
|
+
import { PluginOptions as PluginOptions$1 } from 'pinia-plugin-persistedstate';
|
|
5
5
|
import Uni from '@dcloudio/vite-plugin-uni';
|
|
6
6
|
import Pages from '@uni-helper/vite-plugin-uni-pages';
|
|
7
7
|
import Layouts from '@uni-helper/vite-plugin-uni-layouts';
|
|
@@ -27,8 +27,8 @@ declare module '@vixt/core' {
|
|
|
27
27
|
}
|
|
28
28
|
declare module '@vixt/core/client' {
|
|
29
29
|
interface VixtAppConfig {
|
|
30
|
-
/** https://github.com/
|
|
31
|
-
piniaPersistedState?:
|
|
30
|
+
/** https://github.com/prazdevs/pinia-plugin-persistedstate */
|
|
31
|
+
piniaPersistedState?: PluginOptions$1;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
declare const presetUni: _vixt_core.VixtModule<VixtOptions>;
|
package/dist/index.mjs
CHANGED
|
@@ -124,13 +124,19 @@ const defaults = {
|
|
|
124
124
|
import 'virtual:uno.css'
|
|
125
125
|
import { createSSRApp } from 'vue'
|
|
126
126
|
import * as Pinia from 'pinia'
|
|
127
|
-
import {
|
|
127
|
+
import { createPersistedState } from 'pinia-plugin-persistedstate'
|
|
128
128
|
import { pages as routes } from 'virtual:uni-pages'
|
|
129
129
|
|
|
130
130
|
export function createApp() {
|
|
131
131
|
const app = createSSRApp(App)
|
|
132
132
|
const pinia = Pinia.createPinia()
|
|
133
|
-
pinia.use(
|
|
133
|
+
pinia.use(createPersistedState({
|
|
134
|
+
storage: {
|
|
135
|
+
getItem: uni.getStorageSync,
|
|
136
|
+
setItem: uni.setStorageSync,
|
|
137
|
+
},
|
|
138
|
+
...appConfig.piniaPersistedState,
|
|
139
|
+
}))
|
|
134
140
|
app.use(pinia)
|
|
135
141
|
usePlugins({ app, routes, pinia, appConfig })
|
|
136
142
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vixt/uni",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.18",
|
|
5
5
|
"author": "SoulLyoko<https://github.com/SoulLyoko>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/SoulLyoko/vixt#readme",
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"@uni-helper/vite-plugin-uni-pages": "0.2.24",
|
|
28
28
|
"@vueuse/core": "^11.0.3",
|
|
29
29
|
"pinia": "^2.2.2",
|
|
30
|
-
"pinia-plugin-
|
|
30
|
+
"pinia-plugin-persistedstate": "^4.0.0",
|
|
31
31
|
"unocss": "0.61.6",
|
|
32
32
|
"unplugin-auto-import": "^0.18.2",
|
|
33
|
-
"vue": "^3.5.
|
|
34
|
-
"@vixt/core": "0.1.
|
|
33
|
+
"vue": "^3.5.1",
|
|
34
|
+
"@vixt/core": "0.1.18"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"build": "unbuild"
|