sumor 1.2.6 → 1.2.8
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/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"sumor","type":"module","bin":{"sumor":"cli.js","sr":"cli.js"},"main":"./index.es.js","module":"./index.es.js","exports":{".":{"import":"./index.es.js"}},"dependencies":{"@vitejs/plugin-vue":"^4.2.3","chalk":"^5.3.0","commander":"^11.0.0","esbuild":"^0.19.3","fs-extra":"^11.1.1","vite":"^4.4.9","axios":"^1.4.0","@alicloud/sms-sdk":"^1.1.6","ali-oss":"6.1.1","body-parser":"^1.20.1","compression":"^1.7.4","cookie-parser":"^1.4.6","express":"^4.18.2","knex":"^2.1.0","multer":"^1.4.2","mysql2":"^3.1.0","serve-static":"^1.14.1","spdy":"^4.0.2","uuid":"^3.3.2","glob":"^10.3.4","jsrsasign":"^10.8.6","yaml":"^2.3.2","chokidar":"^3.5.3","http-proxy-middleware":"^2.0.6","archiver":"^2.1.1","extract-zip":"^1.6.6","inquirer":"^8.2.5","node-ssh":"^6.0.0","os-utils":"0.0.14","vite-plugin-rewrite-all":"^1.0.1"},"version":"1.2.
|
|
1
|
+
{"name":"sumor","type":"module","bin":{"sumor":"cli.js","sr":"cli.js"},"main":"./index.es.js","module":"./index.es.js","exports":{".":{"import":"./index.es.js"}},"dependencies":{"@vitejs/plugin-vue":"^4.2.3","chalk":"^5.3.0","commander":"^11.0.0","esbuild":"^0.19.3","fs-extra":"^11.1.1","vite":"^4.4.9","axios":"^1.4.0","@alicloud/sms-sdk":"^1.1.6","ali-oss":"6.1.1","body-parser":"^1.20.1","compression":"^1.7.4","cookie-parser":"^1.4.6","express":"^4.18.2","knex":"^2.1.0","multer":"^1.4.2","mysql2":"^3.1.0","serve-static":"^1.14.1","spdy":"^4.0.2","uuid":"^3.3.2","glob":"^10.3.4","jsrsasign":"^10.8.6","yaml":"^2.3.2","chokidar":"^3.5.3","http-proxy-middleware":"^2.0.6","archiver":"^2.1.1","extract-zip":"^1.6.6","inquirer":"^8.2.5","node-ssh":"^6.0.0","os-utils":"0.0.14","vite-plugin-rewrite-all":"^1.0.1"},"version":"1.2.8"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { createApp } from './main'
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
createApp().then(({ app, router }) => {
|
|
5
4
|
// wait until router is ready before mounting to ensure hydration match
|
|
6
|
-
router.isReady().then(() => {
|
|
7
|
-
|
|
8
|
-
})
|
|
5
|
+
router.isReady().then(() => {
|
|
6
|
+
app.mount('#app')
|
|
7
|
+
})
|
|
8
|
+
});
|
|
9
|
+
|
|
@@ -3,7 +3,7 @@ import { renderToString } from 'vue/server-renderer'
|
|
|
3
3
|
import { createApp } from './main'
|
|
4
4
|
|
|
5
5
|
export async function render(url, manifest, ctx) {
|
|
6
|
-
const { app, router } = createApp()
|
|
6
|
+
const { app, router } = await createApp()
|
|
7
7
|
|
|
8
8
|
// set the router to the desired URL before rendering
|
|
9
9
|
await router.push(url)
|
package/template/web/src/main.js
CHANGED
|
@@ -2,6 +2,7 @@ import { createPinia } from 'pinia'
|
|
|
2
2
|
import { createSSRApp } from 'vue'
|
|
3
3
|
import VueLazyload from 'vue-lazyload'
|
|
4
4
|
import App from './App.vue'
|
|
5
|
+
import {init} from "@sumor/ux";
|
|
5
6
|
import {
|
|
6
7
|
createRouter,
|
|
7
8
|
createMemoryHistory,
|
|
@@ -15,7 +16,8 @@ import env from "./env.js";
|
|
|
15
16
|
// SSR requires a fresh app instance per request, therefore we export a function
|
|
16
17
|
// that creates a fresh app instance. If using Vuex, we'd also be creating a
|
|
17
18
|
// fresh store here.
|
|
18
|
-
export function createApp() {
|
|
19
|
+
export async function createApp() {
|
|
20
|
+
init();
|
|
19
21
|
const app = createSSRApp(App)
|
|
20
22
|
// sumor.init({reactive});
|
|
21
23
|
// app.config.globalProperties.$sumor = sumor;
|